[mythtv-users] All sound out S/PDIF

Bob Sully rcs at malibyte.net
Tue May 20 05:32:00 UTC 2008


> Dan Wilga wrote:
>> When configuring MythTV, the audio setting will look something like
>> this:
>>
>> ALSA:iec958 {AES0: 0x02}
>>
>> That "AES0" part is actually a bitmap of settings. One of the bits is
>> the equivalent of "iecset audio 0". If you can figure out the right
>> value and put it here, MythTV will automatically do the equivalent of
>> "iecset audio 0" for you.
>>
>> To figure out what it is for you, do this:
>>
>> iecset audio 1
>> iecset -x   (look at what it says)
>> iecset audio 0
>> iecset -x   (compare with the previous value)
>>
>> If you see that the second value for AES0 is something other than
>> 0x02, you should probably use that value in Myth's settings.
>>
>> By the way, you shouldn't have to quit MFE just to run "iecset". All
>> you should have to do is make sure it's not actively playing anything.
>> --
>> Dan Wilga                                                        "Ook."
>>
>
> Dan:
> Thanks very much.  Here's what the BE/FE box gives me (via SSH from my
> office machine):
>
> [root at vader: ~]$ iecset audio 1
> Mode: consumer
> Data: audio
> Rate: 48000 Hz
> Copyright: permitted
> Emphasis: none
> Category: PCM coder
> Original: original
> Clock: 1000 ppm
>
> [root at vader: ~]$ iecset -x
> AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02
>
> [root at vader: ~]$ iecset audio 0
> Mode: consumer
> Data: non-audio
> Rate: 48000 Hz
> Copyright: permitted
> Emphasis: none
> Category: PCM coder
> Original: original
> Clock: 1000 ppm
>
> [root at vader: ~]$ iecset -x
> AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
>
>
> 0x06 is not one of the offered "options", but I'll try using it when I get
> home and will let you know how it works.
>
> Thanks again - Bob
> --

> Message: 20
> Date: Mon, 19 May 2008 19:39:15 -0400
> From: "Michael T. Dean" <mtdean at thirdcontact.com>
> Subject: Re: [mythtv-users] All sound out S/PDIF
> To: Discussion about mythtv <mythtv-users at mythtv.org>
> Message-ID: <48320FA3.6010400 at thirdcontact.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 05/19/2008 09:20 AM, Dan Wilga wrote:
>> At 11:14 PM -0700 5/17/08, Bob Sully wrote:
>>
>>> Right now, I still have to exit mythfrontend and run "iecset audio 0",
>>>
>> When configuring MythTV, the audio setting will look something like
>> this:
>>
>> ALSA:iec958 {AES0: 0x02}
>>
>> That "AES0" part is actually a bitmap of settings. One of the bits is
>> the equivalent of "iecset audio 0".
>
> That would be AES0: 0x02.
>
>> If you can figure out the right
>> value and put it here, MythTV will automatically do the equivalent of
>> "iecset audio 0" for you.
>>
>
> Though I thought he was saying the problem is that once this has
> happened, his system never goes back to audio on (removing 0x02 from
> AES0) meaning that something has broken his audio configuration so it's
> not using a proper iec958 definition that sets the IEC958 status bits
> properly with a lock.
>
> The most likely way to break the configuration as described is to
> specify the wrong device information (i.e. using a custom-defined
> logical device, where the custom definition was created by someone who
> didn't understand what he was doing--i.e. by copying/pasting stuff off a
> mailing list post or wiki entry or random web page into the ALSA
> configuration...).  (Yeah, I'm the guy who wrote the .asoundrc that's in
> the wiki, but when I did, I included it in a /very/ long post which
> described how it worked--providing enough information for people to go
> out and do their own research to make it work for their systems.  I'll
> also say that the unmodified .asoundrc I wrote--that's now in the
> wiki--won't cause the issue with invalid IEC958 configuration.  There
> are other modified versions of that .asoundrc in the wiki--some of which
> may be able to cause the issue.)
>
> Mike


OK...I'm getting a bit balder, but I'm *maybe* getting closer - still not
quite there yet.

First of all, to get non-DD5.1 sound out the S/PDIF port, I have to have
this in my .asoundrc file (this is the only line):

pcm.!default spdif

If I don't have anything in this file, I don't get any sound at all via
S/PDIF.  I do not currently have an /etc/asound.conf file.


Next:  Going back to Jesse Burt's post.  Issuing "alsactl names" returns
nothing, but on my BE/FE box, the /etc/asound.names file looks very
similar to the file he posted.  So, I tried "ALSA:plug:spdif" as he
suggested as the default sound device; per today's earlier post, I tried
ALSA:iec958 { AES0 0x06 } as the default pass-through device.  With this I
can play my NON-Dolby-Digital (stereo) recordings - with sound.

Mythmusic plays.  I can watch videos using "mplayer -fs -zoom -quiet -vo
xv -ao alsa:device=spdif -afm hwac3 %s" (either real DD 5.1 videos, which
play in 5.1, or stereo videos, which play in faux-4.0 "ProLogic")

HOWEVER:
I now cannot play 5.1 recordings made from QAM with sound.  Dead silence,
and the lights on my receiver do not show an attempt to go to 5.1 DD mode.
 In the log, I see this:

TV:  Attempting to change from None to WatchingPreRecorded
AFD: Opended codec 0x581f790, id(MPEG2VIDEO) type(Video)
AFD: Codec AC3 has 6 channels
AFD: Opened codec 0x5987130, id(AC3) type(Audio)
DPMS Deactivated
AFD: Opened codec 0x59b3500, id(MPEG2VIDEO), type(Video)
AFD: codec AC3 has 6 channels
AFD: Opened codec 0x59ea6c0, id(AC3), type(Audio)
Opening audio device 'plug:spdif'. ch6(2) sr 48000
Opening ALSA device 'iec958:{ AES0 0x06 }'.
AudioOutputError: Channels count (6) not available: Invalid argument
AudioOutputError: Unable to set ALSA parameters
NVP: Disabling audio, reason is: Unable to set ALSA parameters

I get the same errors if I use ALSA:iec958 { AES0 0x02 } as the default
pass-through device.

Going back to "Default" as the pass-through gives that annoying static
noise (my guess is it's digital data being played as "analog sound").

It shouldn't be this damn tough...!  ;-/

Any other ideas?  Again, I can now play anything EXCEPT DD5.1 QAM
recordings without leaving the frontend to reset anything.  All I need to
do now is get the passthrough device configured correctly.

Actually, right now it's behaving as it did before when I had "/dev/adsp"
as the default audio device, "Default" as the pass-through, and "iecset
audio 1" set, with both "Enable AC3" and "Enable DTS" boxes checked (they
are now).

Aaargh...close yet far.

Bob

-- 
________________________________________
Bob Sully - Simi Valley, California, USA
http://www.malibyte.net
http://www.malibyte.com



More information about the mythtv-users mailing list