Sound problems fall into several categories:
- Audio input problems associated with software-encoding video capture cards (the sort that require a cable between the capture card and the computer's sound card)
- Audio output problems related to Linux drivers and software
- Audio problems related to advanced or unusual hardware (Dolby Digital output, for instance)
- 1 Software-encoding video capture card problems
- 2 Hardware encoding card problems
- 3 Audio output driver problems
- 4 Advanced hardware problems
- 5 No Audio for DVD playback
- 6 Digital Audio over HDMI cable
Software-encoding video capture card problems
These problems can be very frustrating to troubleshoot. They're usually related to drivers and other software issues, although you should always check your cabling. Be sure the audio output from the capture card goes to the sound card's audio input jack!
Only left channel is recording
If your sound card is intel8x0 or maybe others then its alsa's fault. Its failing to set both capture channels to linein. One is left on the mic channel to fix this run this command.
amixer cset iface=MIXER,name='Capture Source' 4,4 numid=24,iface=MIXER,name='Capture Source'
Another fix is to upgrade alsa, but some people have said this problem still continues.
More information here.
Echo on audio input
For the VIA 8237 chipset used on the Biostar PT880 Pro-A7C motherboard (and probably others), the audio external line input can produce an echo effect if the "Duplicate Front" mixer channel is enabled. This channel is easily disabled via alsamixer. Be sure to mute the channel, not just turn down the gain on it. For Yamaha DS-1 (YMF724F) you have to mute audio recording from "Wave Capture".
Distorted audio on input
Some audio chipsets' drivers have limited options concerning encoding, and sometimes playback, sample rates. For instance, as of the 22.214.171.124 kernel's ALSA drivers, the VIA 8237 chipset used in the Biostar PT880 Pro-A7C motherboard handles a 48,000Hz sample rate, but few or no others. Ubuntu 6.10's installation of MythTV 0.20 defaults to a 32,000Hz sample rate. The result is an unpleasant "razzing" effect, slightly reminiscent of a Dalek. This effect is amplified by the MP3 encoding that's also done to the audio. It can be further amplified by the echo effect noted earlier; the combined result is most unpleasant!
The solution is to modify the recording options. You'll need to do this for each of several recording profiles in the Utilities/Setup -> Setup -> TV Settings -> Recording Profiles -> Software Encoders area -- live TV, default, low quality, and high quality. It's easiest to adjust these options using the live TV option and then copy your best options to the other profiles.
Hardware encoding card problems
Hardware encoding cards (which deliver a precompressed data stream, typically MPEG-2, to the computer) don't require a sound card to work properly (although you will of course need a sound card for playback). Audio problems with these cards are therefore likely to be related to the capture card's drivers or to the way MythTV interacts with the hardware encoding device.
Muted audio on a CX88 "Blackbird" card
The combination of Conexant CX2388x and CX23416 chips is often found on cards that follow the "Blackbird" reference design. These cards use the
cx88-blackbird drivers in Linux. At least one such card, the AVerMedia M150-D, comes up with its volume muted by default. This problem can be rectified by using
v4lctl -c /dev/video1 volume mute off
Change the device filename reference for your system, if necessary, and enter this command in a local startup script, such as
/etc/rc.local on Ubuntu.
"Razzy" audio on a CX88 "Blackbird" card
When using at least one "Blackbird" card, the AVerMedia M150-D, MythTV sometimes records "razzy" audio with earlier kernels (see the card's Wiki entry for details) -- voices sound as if the speakers had kazoos stuck in their throats. The solution in this case was to use an external tuning script:
#!/bin/bash v4lctl -c /dev/video1 setchannel $1 v4lctl -c /dev/video1 volume mute off #sleep 1
The device file reference must be checked, and perhaps changed, for your system. Launch
mythtv-setup, enter the Input Connections area, select the input you're using, and enter the filename for the script in the External Channel Change Command field.
The above script also incorporates a volume-unmute command, as described earlier, obviating the need to use such a command in a startup script. I initially included a
sleep command to insert a 1-second delay because I believed the problem might be related to timing issues (namely, MythTV attempting to open the MPEG device before it was ready). The
sleep command appears to be unnecessary on my system, though; either my timing hypothesis was wrong or the rest of the script introduced enough of a delay to avoid problems. If the problem persists for you when using my script, uncomment the
sleep command to see if it helps.
This solution does have a major drawback: Before implementing the solution, channel surfing on the M150-D was unreliable but did work at least some of the time, albeit usually with "razzy" audio. When using this channel-change script, though, the MythTV frontend seems to hang 100% of the time. Thus, channel surfing is impossible with the card. Scheduled recordings work fine, though.
Audio output driver problems
Audio output driver problems can be caused by buggy or incomplete drivers or by improper settings. A good starting point for debugging is the ALSA Project documentation. Locate your audio chipset and read the instructions for configuring it. Test your output first using the stereo output jack, even if you intend to use more advanced outputs; the 2-channel case is generally simpler and is therefore easier to get working.
Note that version 0.20 has a bug 2468 which can result in sound being absent during playback. Selecting an alternate audio track should work around this issue. This has manifested as absent audio on recordings scheduled with 0.20, while recordings scheduled with an earlier version but recorded using myth 0.20 had sound.
No sound from mythtv, but mplayer can play sound
Seen on Fedora 12 to 13 + MythTV 0.22 to 0.23, with analog sound: Fixed by setting mixer control to Master and entering ALSA:front as audio device. ALSA:front was not in the list of audio devices so it had to be entered manually with the onscreen keyboard. Mixer control is PCM by default.
To choose the correct ALSA device when multiple devices are present, follow these steps:
- Verify MythTV is able to use ALSA.
- Find the list of ALSA device names:
- Prepend "ALSA:" to the name of the device, eg "ALSA:default:CARD=nForce2"
- Set it via the GUI or in the "settings" table for the "AudioDevice" and "AudioOutputDevice" values.
Sound is stuttering
Be sure that you checked "Big audio buffer" in Configuration Menu for TV page 1.
Else, might be caused by a bad driver. Try to switch to a different driver. Known examples and solutions:
- System running Fedora 10 with sound to ALSA:Default stutters. Switching to /dev/dsp solved the problem.
Advanced hardware problems
Advanced audio hardware can be problematic because of the comparitive rarity of the hardware, and therefore the lack of discussion of problems related to it in the Linux community.
Lack of appropriate 6-channel output hardware
Many sound cards and motherboards claim 6-channel (Dolby Digital 5.1) or better output, but lack obvious connectors (enough analog jacks or externally-accessible SPDIF connectors). Such hardware typically has internal three-pin SPDIF headers. You can connect an external SPDIF bracket to the internal header. You can build such a bracket yourself if you know how to solder and have the parts, or you can buy one -- if you can find one! They're extremely hard to track down. Two sources for such brackets are:
- VidaBox, a company that specializes in high-end home entertainment equipment and DVRs. This bracket is one of the least expensive items they carry.
- Atacom, a Web-based PC and components store.
Both brackets feature both optical and coaxial outputs, enabling you to connect your computer's output to most AV receivers. Unfortunately, by the time you add shipping, you'll spend almost as much on the bracket as you would on a sound card with appropriate output hardware. Depending on your case's design, though, you might be able to put the bracket in a socket that can't be used by an expansion card. On the other hand, if you intend to use the bracket with a motherboard's audio hardware, be sure to check the header's location -- it might just block an expansion card when in use!
Working SPDIF output but only 2-channel sound
the VIA 8237 chipset used on the Biostar PT880 Pro-A7C motherboard supports SPDIF output, and so should produce 5.1-channel sound from appropriate sources, once equipped with an output bracket. Unfortunately, this didn't work with MythTV 0.20 on an Ubuntu 6.10 system, which ships with the 2.6.17 kernel. The hardware produced sound, but it was of the 2-channel variety. Dolby Digital output was produced by mplayer, though. After upgrading to a 126.96.36.199 kernel, MythTV could produce 5.1-channel output from appropriate sources (DVDs or files ripped from them).
Another possible cause of too-few sound channels is mixer settings. Check in the alsamixer utility (or some other mixer) to be sure that the "Channel Mode" is set to "6," or higher if appropriate. (This option could have other names depending on your hardware.)
No Audio for DVD playback
I had a problem with DVD audio playback when all other Audio was working properly. Usually this problem appears to be caused by muted mixer channels, but in my case the problem was a missing decoder library a52lib required by ffmpeg for decoding the DVD audio. I fixed this by adding "a52" to my USE flags and recompiling ffmpeg.
Digital Audio over HDMI cable
Digital audio over an HDMI cable will work, but it takes some setup. You must have the appropriate version of ALSA and of the drivers for your video card, both of which may not be installed by default with your distribution. After doing so, you should make sure that the HDMI audio device (which may be named IEC958) is not muted or turned off in alsamixer or the sound setting control panel for your distribution. Then, you must tell MythTV to use the HDMI output rather than the default analog or other digital output. The easiest? (or at least one way) to do this is to change the default audio output in alsa.conf.
- Works with Gigabyte GA-M78SM-S2H motherboard with on-board NVIDIA 8200 video card, using ALSA-driver and ALSA-lib versions 1.0.18a and NVIDIA driver version 177.82.