<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Ah ok ignore that - I finally found what Colin's patch fixes :-) It is specifically when using udev (not alsa module loading as I have been previously) that it has an effect ie. if you have:<br>load-module module-alsa-sink device=a52 rate=48000 sink_properties=device.description=a52 sink_name=a52<br>load-module module-alsa-sink device=ALC889A_Digital sink_properties=device.description=SPDIF sink_name=SPDIF<br>it won't help, but if you use udev and udev loads SPDIF stereo and A52, then it seems to work (although I am having other issues).<br><br>Frankly, I think it would be much better to have A52 in Pulseaudio with switchable channel maps so that there's one sink.<br><br>I'll see how much further I can get with this.<br><br>Cheers,<br>Mike<br><br><br></div><div style="font-family:
arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael Rans <mcarans@yahoo.co.uk><br><b><span style="font-weight: bold;">To:</span></b> General PulseAudio Discussion <pulseaudio-discuss@mail.0pointer.de><br><b><span style="font-weight: bold;">Sent:</span></b> Sun, 11 July, 2010 19:40:23<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support<br></font><br><meta http-equiv="x-dns-prefetch-control" content="off"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">Further to my email below, I find that using udev detection and the change you suggested to default.conf, I get resource busy - I don't
think my card likes it that it's SPDIF is opened twice, once as a stereo digital device and again through A52:<br><br>E: alsa-util.c: snd_pcm_avail() returned a value that is exceptionally large: 11549256 bytes (21823 ms).<br>E: alsa-util.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA developers.<br>...<br>E: alsa-util.c: snd_pcm_mmap_begin() returned a value that is exceptionally large: 11549256 bytes (21823 ms).<br>E: alsa-util.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA
developers.<br>...<br>D: alsa-sink.c: snd_pcm_mmap_commit: Resource temporarily unavailable<br>E: alsa-sink.c: Assertion 'err != -11' failed at modules/alsa/alsa-sink.c:395, function try_recover(). Aborting.<br><br>Assuming this is not just my system's problem, this would be why a Pulseaudio A52 plugin would be better.<br><br>Cheers,<br>Mike<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael Rans <mcarans@yahoo.co.uk><br><b><span style="font-weight: bold;">To:</span></b> General PulseAudio Discussion <pulseaudio-discuss@mail.0pointer.de><br><b><span style="font-weight: bold;">Sent:</span></b> Sun, 11 July, 2010 18:40:36<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support<br></font><br><div style="font-family: arial,helvetica,sans-serif;
font-size: 10pt;"><div>Thanks for this detailed reply.<br><br>Would I be right in saying that for this to happen, you cannot define your own sinks in default.pa using load-module module-alsa-sink ... but must use the moduel detection?<br><br>Or can profiles be made to work with the load-module module-alsa-sink ... lines?<br><br>Cheers,<br>Mike<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Tanu Kaskinen <tanuk@iki.fi><br><b><span style="font-weight: bold;">To:</span></b> pulseaudio-discuss@mail.0pointer.de<br><b><span style="font-weight: bold;">Sent:</span></b> Sun, 11 July, 2010 12:23:25<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [pulseaudio-discuss]
{PATCH][RFC] AC3 passthrough support<br></font><br>On Sun, 2010-07-11 at 09:26 +0000, Michael Rans wrote:<br>> That's the the problem - as you put it "both sinks (spdif/stereo and<br>> spdif/a52) can't exist at the same time".<br>> <br>> If A52 encoding occurred in Pulseaudio, there would only be one sink,<br>> hence the switch between stereo and A52 would be transparent and could<br>> occur even while the music is playing (with a small interruption).<br><br>No, doing the encoding in pulseaudio wouldn't change the situation.<br>There must be separate sinks for stereo and surround modes, because<br>sinks can't change their channel map on the fly. (Of course that could<br>be changed, but I don't think such change gets lots of support from the<br>developers.) What do you mean by "transparent"? You can change the<br>profile while music plays, that's not a problem.<br><br>> Is the A52
profile in Ubuntu Lucid 10.04LTS?<br><br>Most likely yes.<br><br>I now actually checked what's the situation with the a52 profile on my<br>own machine. I don't have the profile available, even though I have<br>other spdif profiles, so I looked at the initialization to see what's<br>wrong, and found this:<br><br>D: alsa-mixer.c: Looking at profile output:iec958-ac3-surround-40<br>D: alsa-mixer.c: Checking for playback on Digital Surround 4.0 (IEC958/AC3) (iec958-ac3-surround-40)<br>D: alsa-util.c: Trying a52:0 with SND_PCM_NO_AUTO_FORMAT ...<br>I: (alsa-lib)pcm.c: Unknown PCM a52:0<br>I: alsa-util.c: Error opening PCM device a52:0: No such file or directory<br><br>So alsa doesn't find the a52 device at all, even though I do seem to<br>have the plugin installed (this file<br>exists: /usr/lib/alsa-lib/libasound/libasound_module_pcm_a52.so). I<br>don't feel like experimenting, but I would guess that device string<br>"a52" instead of "a52:0" would work
better.<br><br>...nah, I did feel like experimenting after all, since all I had to do<br>was to edit one file<br>(/usr/local/share/pulseaudio/alsa-mixer/profile-sets/default.conf) and<br>do some pulseaudio restarting. It turned out that plain a52 didn't work<br>any better, so what's wrong? Well, at least on Debian there is no device<br>configured by default that would use the a52 plugin, so I had to add<br>this to ~/.asoundrc:<br><br>pcm.a52 {<br> type a52<br>}<br><br>Now I got further:<br><br>D: alsa-mixer.c: Looking at profile output:iec958-ac3-surround-40<br>D: alsa-mixer.c: Checking for playback on Digital Surround 4.0 (IEC958/AC3) (iec958-ac3-surround-40)<br>D: alsa-util.c: Trying a52:0 with SND_PCM_NO_AUTO_FORMAT ...<br>I: (alsa-lib)conf.c: Unknown parameters 0<br>I: (alsa-lib)pcm.c: Unknown PCM a52:0<br>I: alsa-util.c: Error opening PCM device a52:0: Invalid argument<br>D: alsa-util.c: Trying a52 with SND_PCM_NO_AUTO_FORMAT ...<br>D:
alsa-util.c: Managed to open a52<br>D: alsa-util.c: snd_pcm_hw_params_set_channels(4) failed: Invalid argument<br>D: alsa-util.c: Trying a52 without SND_PCM_NO_AUTO_FORMAT ...<br>D: alsa-util.c: Managed to open a52<br>D: alsa-util.c: snd_pcm_hw_params_set_channels(4) failed: Invalid argument<br>D: alsa-util.c: Trying plug:a52 with SND_PCM_NO_AUTO_FORMAT ...<br>D: alsa-util.c: Managed to open plug:a52<br>D: alsa-util.c: snd_pcm_hw_params_set_channels(4) failed: Invalid argument<br>D: alsa-util.c: Trying plug:a52 without SND_PCM_NO_AUTO_FORMAT ...<br>D: alsa-util.c: Managed to open plug:a52<br>D: alsa-util.c: snd_pcm_hw_params_set_channels(4) failed: Invalid argument<br>I: alsa-util.c: Failed to set hardware parameters on plug:a52: Invalid argument<br><br>That looks good (that's the 4.0 profile, and by default the a52 plugin<br>uses the 5.1 channel configuration, so the failure is expected). From<br>that log we can see that indeed, "a52:0" doesn't work,
but "a52" does.<br>That means that you don't have the profile available, because you don't<br>have the modification in your profile set configuration.<br><br>So, what about the 5.1 profile?<br><br>D: alsa-mixer.c: Looking at profile output:iec958-ac3-surround-51<br>D: alsa-mixer.c: Checking for playback on Digital Surround 5.1 (IEC958/AC3) (iec958-ac3-surround-51)<br>D: alsa-util.c: Trying a52:0 with SND_PCM_NO_AUTO_FORMAT ...<br>I: (alsa-lib)conf.c: Unknown parameters 0<br>I: (alsa-lib)pcm.c: Unknown PCM a52:0<br>I: alsa-util.c: Error opening PCM device a52:0: Invalid argument<br>D: alsa-util.c: Trying a52 with SND_PCM_NO_AUTO_FORMAT ...<br>D: alsa-util.c: Managed to open a52<br>D: alsa-util.c: Maximum hw buffer size is 320 ms<br>D: alsa-util.c: Set buffer size first (to 4797 samples), period size second (to 1199 samples).<br>I: alsa-util.c: Device a52 doesn't support 44100 Hz, changed to 48000 Hz.<br>D: alsa-mixer.c: Profile
output:iec958-ac3-surround-51 supported.<br><br>Whee, it works! I don't have anything to connect the digital output,<br>though, so I didn't test actual playback, but at least the profile is<br>now available.<br><br>So, the first problem when trying to make the a52 alsa plugin work out<br>of the box with pulseaudio is that (at least on all distros) the a52<br>device isn't configured by default. I think it's the job for the<br>distributions to automatically configure the device when the a52 plugin<br>is installed.<br><br>The second problem is that the a52 device doesn't support the card<br>argument. I would imagine that the a52 plugin can actually be configured<br>to use certain card, but passing that configuration just doesn't work<br>with the simple configuration that I used. It might be possible to come<br>up with a more complex definition for the a52 device that passes the<br>parameter correctly to the plugin, but my asoundrc skills are not
that<br>good. In case the a52 plugin really can't be configured to use certain<br>card, then that's a bug in the plugin.<br><br>After those two problems we get to the problems with assertion failures<br>and too fast playback speed etc...<br><br>-- <br>Tanu Kaskinen<br><br><br>_______________________________________________<br>pulseaudio-discuss mailing list<br><a rel="nofollow">pulseaudio-discuss@mail.0pointer.de</a><br><a rel="nofollow" target="_blank" href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br></div></div>
</div><br>
</div></div>
</div><br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>
</body></html>