[mythtv] Solution to the Tinny Audio Problem for Hauppage [soln]

Eric McIntyre eric.m.mcintyre at gmail.com
Sat May 27 15:04:54 UTC 2006


After searching various archives, I've found that numerous times in the last
few months MythTV users have been asking about tinny audio on their Hauppage
cards. I was one such user until I happened across an ivtv-dev mailing list
archive with a solution that worked for me.

My PVR-150 card had the tinny audio problem particularly bad, and while some
users reported a 50-60% success rate for clean-audio MythTV recordings, mine
was closer to 5%. After this fix, all of my MythTV recordings sounded good.

This idea was posted on the ivtv-dev list on Sunday 16 April 2006, by Jim
Pulokas. I've added the steps necessary to implement it on my FC5. Jim calls
it a very crude hack, and it is in some ways, but it didn't break anything
on my system and was a very welcome solution. Also, there are svn commits of
similar solutions on ivtv now (I think).

My environment:
2.6.16-1.2111_FC5
i686 GNU/Linux
mythtv-0.19-128
ivtv-0.6.2-110

Idea from Jim Pulokas:
Quoting from
http://www.gossamer-threads.com/lists/ivtv/devel/29909?page=last
> I am trying a very crude hack that seems to fix my
> problem (may break other stuff though)
> In cx25840-audio.c, I added a reset of cx25840
> register 0x803 at the end of the set_audclk_freq
> function.
> In other words, before returning from set_audclk_freq,
> add the following lines:
> cx25840_and_or(client, 0x803, ~0x10, 0x00);
> cx25840_and_or(client, 0x803, ~0x10, 0x10);

Here's the step by step:

You'll need working kernel sources installed.

1) Make sure Mercurial is installed:
1a) "rpm -q mercurial"
1b) If you have mercurial installed, goto 2
1c) Else, yum install mercurial

2) The cx25840-audio.c is a file in v4l. First, download the v4l source
2a) From http://www.linuxtv.org/v4lwiki/index.php/How_to_build_from_CVS
2b) "hg clone http://linuxtv.org/hg/v4l-dvb"

3) From the source code directory, edit cx25840-audio.c
3a) "vi ./linux/drivers/media/video/cx25840/cx25840-audio.c"

4) Find the set_audclk_freq and add the two lines from Jim
4a) hint: it is the first function in the file, at this time anyway
4b) end of the function should look like:
        state->audclk_freq         cx25840_and_or(client, 0x803, ~0x10, 0x00); //added line to fix
tinny / reset reg. 0x803
        cx25840_and_or(client, 0x803, ~0x10, 0x10); //added line to fix
tinny / reset reg. 0x803
    return 0; //original code

5) You can try returning to the root directory and doing a make, then make
install.

6) If the make fails because your build environment doesn't include the
right headers, or for some other reason (like mine did), then continue. If
the make works then you're done and skip to 11. Otherwise...

7) "make menuconfig"

8) Navigate the menus to only select the drivers you need for your system.
8a) I unselected everything but
"<M> Video for Linux",
"[*] Video for Linux API Layer 1 (DEPRECATED)",
"[*] Enable Debug Functionality",
"[*] Conexant CX2584x audio/video decoders"

9) Exit, save, and "make"

10) "make install"

11) I did a reboot; you might be able to reload some modules w/o doing so.

12) The audio from the PVR-150 is un-tinny-fied.

Thanks to Jim for this excellent idea.

-Eric McIntyre
(eric.m.mcintyre at gmail.com)

Thu May 4 21:16:58 EDT 2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20060527/d5800c74/attachment.htm 


More information about the mythtv-dev mailing list