So I recently stepped into the modern world. I gave up my 32" CRT TV w/ scan converter for a 40” 1080p LED HDTV. Woo hoo! Unfortunately, it seems I have traded one set of problems for another.

I've got my Nvidia video card attached to my TV via hdmi cable and am attempting to play audio through the TV's two internal speakers (details below). What I am currently wrestling with are many audio buffer underruns. The issue manifests itself as audio “hiccups” when watching TV.

The odd thing is that it is inconsistent. An OTA channel broadcasting at 1080 may seem fine, while a channel broadcasting an old episode of Stargate SG1 at 480 “hiccups” every other sentence. One might think the opposite should be true. It starts acting up right about the time I think I have solved the problem.

A quick check of my mythfrontend.log file reveals lots of these:
Code:
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: I CoreContext avformatdecoder.cpp:1960 (ScanStreams) AFD: codec AC3 has 2 channels
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: I CoreContext avformatdecoder.cpp:2102 (ScanStreams) AFD: Opened codec 0x2310b90, id(AC3) type(Audio)
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: I CoreContext audio/audiooutputbase.cpp:791 (Reconfigure) AO: Opening audio device 'dmix:CARD=NVidia,DEV=7' ch 2(2) sr 48000 sf signed 32 bit reenc 0
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: E CoreContext audio/audiooutputalsa.cpp:195 (SetPreallocBufferSize) ALSA: Setting hardware audio buffer size to 24064
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: E CoreContext audio/audiooutputalsa.cpp:211 (SetPreallocBufferSize) ALSA: Error opening /proc/asound/card0/pcm7p/sub0/prealloc: Permission denied. 
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: E CoreContext audio/audiooutputalsa.cpp:213 (SetPreallocBufferSize) ALSA: Try to manually increase audio buffer with: echo 24064 | sudo tee /proc/asound/card0/pcm7p/sub0/prealloc
May 20 11:36:18 ubuntu-pvr mythfrontend[1714]: E CoreContext audio/audiooutputalsa.cpp:545 (OpenDevice) ALSA: Unable to sufficiently increase ALSA hardware buffer size - underruns are likely
When Googling this error, most other issues out there seem to be resolved by simply increasing prealloc. However, this is a moving target in my case. As soon as I increase prealloc to what it suggests, it immediately asks to raise it further. After setting prealloc to the maximum of 32768, the errors now become:
Code:
May 20 20:19:17 ubuntu-pvr mythfrontend[1714]: I CoreContext avformatdecoder.cpp:2102 (ScanStreams) AFD: Opened codec 0x4429b90, id(MPEG2VIDEO) type(Video)
May 20 20:19:17 ubuntu-pvr mythfrontend[1714]: I CoreContext avformatdecoder.cpp:1960 (ScanStreams) AFD: codec AC3 has 2 channels
May 20 20:19:17 ubuntu-pvr mythfrontend[1714]: I CoreContext avformatdecoder.cpp:2102 (ScanStreams) AFD: Opened codec 0x2b42f40, id(AC3) type(Audio)
May 20 20:19:17 ubuntu-pvr mythfrontend[1714]: I CoreContext audio/audiooutputbase.cpp:791 (Reconfigure) AO: Opening audio device 'dmix:CARD=NVidia,DEV=7' ch 2(2) sr 48000 sf signed 32 bit reenc 0
May 20 20:19:17 ubuntu-pvr mythfrontend[1714]: E CoreContext audio/audiooutputalsa.cpp:545 (OpenDevice) ALSA: Unable to sufficiently increase ALSA hardware buffer size - underruns are likely
True, I could likely increase prealloc_max and thus increase prealloc even further. However, I don't think that is the real issue. A 32MB audio buffer should be way more than I need. Something else is going here, and I'm looking for feedback regarding where to look.

Since prealloc is owned by root on my system, adding the mythtv user to the audio group does not have any effect.

My hardware & software should be sufficient:
Apex 40” 1080p, LED hdtv model# LE-40H88
Gigabyte GA-H67N-USB3-B3 (internal audio chipset is turned off)
Intel i3 2100
4GB RAM
128GB SSD boot drive + storage partition
two additional SATA II drives
All video data volumes are XFS
HDHomerun configured for OTA
Nvidia GeForce GTX 550 w/ 1G DDR5
Mythbuntu 12.04 LTS x86_64
Mythtv 0.25 + latest patches


TO DO:
Verify this problem occurs with the handful of unencrypted channels I get from Charter via a second hdhomerun.

Please let me know your suggestions.