[mythtv-users] 2 Channel Audio Not Working-- Help

DaveD mythtv at guiplot.com
Sun Oct 19 17:37:51 UTC 2008


My experience with alsa/spdif and myth/xine/mplayer/etc...

My sound works fine.  I can play mp3's with xmms, listen to CD's, etc, 
etc.  Then I run any app (including Myth, xine, mplayer, etc) that I 
have configured to use the passthrough and play back something with 
Dolby sound that actually uses the passthrough (like an HD recording or 
DVD) and it works beautifully.  Then I exit that app and go back to 
trying to play music (or other standard stereo sound) and have no stereo 
sound.  All apps that pass through still work but not those that rely on 
alsa to re-digitize and send bits out the spdif.  What is apparently 
happening is that none of the apps set the alsa state back to where it 
was so the "regular" stereo doesn't get played.  I would call this a bug 
in the alsa system.  I'm guessing the alsa devs would call it a bug in 
the apps.  Regardless...

The first time this happened, lots of Googling revealed that alsa stores 
its current (and sometimes broken) state in /etc/alsa/asound.state when 
it exits so that same state can be restored when it loads again.  
Deleting the file doesn't help because alsa re-writes it when the 
computer shuts down and the module is unloaded so rebooting doesn't 
help.  The only way to get rid of the broken state is to reboot on the 
recovery CD (or another distro like I have loaded, just for such cases) 
and delete asound.state.  Then when the system reboots, the defaults are 
used and all is well again.  Until I run Myth or mplayer or.....

To enable recovering from the broken alsa state without having to 
reboot, I performed the above procedure to get it working, when it exits 
then rebooted (to save the default, working state) and copied 
/etc/alsa/asound.state to /etc/alsa/asound.state.good.  This gave me a 
sample of a good state that can be restored "on the fly" with the 
command (as root)
  >#  alsactl -f /etc/alsa/asound.state.good restore
I haven't tried it, but you could probably save the reboot with
  >#  alsactl -f /etc/alsa/asound.state.good store

There is one more step that I need to perform.  I use KDE and run kmix 
for the volume control.  If I tell it to open the mixer, there is a tab 
called "Switches" that contains a button for "IEC958 Optical Raw".  If 
that is turned on, I wont get stereo sound.  Some times I can simply 
turn this off and the stereo works.  Other times I have to use the 
alsactl command.  Usually I have to do both.  I haven't studied it close 
enough to determine what/when/how the different steps are needed.  I 
just do them.

This has been a real PITA and I keep hoping it will get fixed.  The 
latest distro I have tried is Ubuntu 8.04 which didn't even recognize my 
Audigy 2 sound card.  I had to download the alsa source to get it to 
have sound at all and then it STILL had the same problem switching 
between stereo and AC3.  I've gotten so used to doing it, though, I just 
live with it.  Each time, though, I think I should figure out a better 
way (wrappers that put the state back?).  I'm hoping Allen's procedure 
(delete asound.conf, I have no .asoundrc) will fix it.  I'll give it a try.

I might mention that I'm running FC7, but I had the same problem on FC5 
and FC8, Ubuntu 7 and Ubuntu 8 and Suse 10 and Suse 11 (still searching 
for that perfect distro...) and that I run KDE.  I have tried using KDE 
with sound system enabled and disabled (I really don't know what that 
means since I see no difference).  I'm surprised I don't see more 
threads about this and I assume it's something particular to my Audigy.  
Sure would be nice to get it fixed.

DaveD

Allen Edwards wrote:
> What I always recommend, and has worked for several people is to
> rename or delete asound.conf and .asoundrc.  Set the passthrough
> device to ALSA:iec958:{ AES0 0x02 } and the audio output device to
> ALSA:spdif.  If you are running Fedora, get rid of Pulse Audio (not
> trivial apparently).  Turn on iec958 in alsamixer.
>
> Allen
>
>
>
> On Fri, Oct 17, 2008 at 2:56 PM, Hans Houwaard <hans at ginder.xs4all.nl> wrote:
>   
>> Weirdness,
>>
>> I already have this exact same asound.conf, but I recently lost playback on
>> audio in mythtv for the media mp3 player. There is no sound, while before
>> there was. The only update I saw the was installed was a new version of hal.
>>
>> Since my asound.conf already has this config, I have no clue how to get audio
>> playback back. Sound in TV with DVB and in Video using vlc or xine still
>> works.
>>
>> Hans Houwaard
>>
>> Op Friday 17 October 2008 22:20:46 schreef Jason McKnight:
>>     
>>> Thanks!
>>>
>>> I'll try that this weekend.
>>>
>>> ----- Original Message -----
>>> From: "Seth Daniel" <mythtv.org at sethdaniel.org>
>>> To: mythtv-users at mythtv.org
>>> Sent: Friday, October 17, 2008 3:28:41 PM GMT -05:00 US/Canada Eastern
>>> Subject: Re: [mythtv-users] 2 Channel Audio Not Working-- Help
>>>
>>> On Fri, Oct 17, 2008 at 03:04:01PM -0400, Jason McKnight wrote:
>>>       
>>>> I have a machine running Mythbuntu 8.04 with audio being piped out via
>>>> the optical (iec958 I think). I recently lost audio on any stereo sound.
>>>> I'm not sure if it was an update or something I changed in a config.
>>>> Anything with 5.1 is great, but music and movies encoded in stereo only
>>>> play with no sound.
>>>>
>>>> I have tried all sorts of settings in alsamixer and in the general setup
>>>> inside Myth, but the only thing I can accomplish is getting 5.1 sound to
>>>> stop.
>>>>
>>>> Any ideas or suggestions?
>>>>         
>>> I had the same issue when I upgraded my myth box to Ubuntu 8.04 (it
>>> worked fine before then).  I tried all sorts of things.  The only thing
>>> that got it to work again was this .asoundrc:
>>>
>>>   pcm.!default {
>>>     type plug
>>>     slave {
>>>       pcm "spdif"
>>>       rate 48000
>>>       format S16_LE
>>>     }
>>>   }
>>>
>>>
>>> I found it by searching the gossamer-threads archive of the mythtv-users
>>> mailing list.  Oddly it was this thread:
>>>
>>> http://www.gossamer-threads.com/lists/mythtv/users/175424#175424
>>>
>>> where I found it.  The OP was having the *opposite* problem (2 channel
>>> audio was fine, but he couldn't play 5.1).
>>>
>>> Alsa is a black box to me.  I have no idea what the above does.  I also
>>> don't know why it was working without this .asoundrc and then stopped
>>> working when I upgraded to Ubuntu 8.04.
>>>
>>> I hope the above helps.
>>>       
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>     
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>   


More information about the mythtv-users mailing list