[alsa-devel] Problems with pulseaudio / asla on PS3
Hi,
I'm trying to get an jukebox application going on a Sony PlayStation3 using Qt-Embedded, Phonon and PulseAudio. The application is working well on my KDE- based laptop where it appears that the application is using Phonon -> ALSA -> PulseAudio. But there is no sound from the application when run on the PS3.
I initially reported this problem to the PulseAudio mailing list. The first post on this topic is at https://tango.0pointer.de/pipermail/pulseaudio- discuss/2008-August/002249.html . In pacticular, see these posts:
1) https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008- September/002346.html where I detail the results of a final test using the latest development version of PulseAudio; and
2) https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008- September/002347.html where a PulseAudio developer diagnoses the problem as being within ALSA.
For convenience, the following is from the latter post:
"So, what happens here is this: your device can only do non-interleaved audio and is hence configured for it (as we can see from that "slave setup" listing above). Because your hardware lacks a hardware volume control ALSA puts "softvol" on top of the hw device: the "Soft Volume PCM" you can see in the first part. That device is initialized for interleaved audio as you can see. Which is what PA supports and PA asked for.
Now, if softval takes non-interleaved from below and gives interleaved to the layer above than it would need to rearrange those samples -- which it however doesn't actually. PA hence checks with those asserts if the audio data is properly arranged -- which it is not as we can see.
This is a bug in ALSA's softvol module. Please report this on alsa-devel. softvol falsely claims to be able to rearrange non-interleaved audio to interleaved."
Not sure what other information I should post here so I'll wait for any feedback.
Thanks in advance, Kevin
At Fri, 5 Sep 2008 08:42:08 +1000, Kevin Gilbert wrote:
Hi,
I'm trying to get an jukebox application going on a Sony PlayStation3 using Qt-Embedded, Phonon and PulseAudio. The application is working well on my KDE- based laptop where it appears that the application is using Phonon -> ALSA -> PulseAudio. But there is no sound from the application when run on the PS3.
I initially reported this problem to the PulseAudio mailing list. The first post on this topic is at https://tango.0pointer.de/pipermail/pulseaudio- discuss/2008-August/002249.html . In pacticular, see these posts:
September/002346.html where I detail the results of a final test using the latest development version of PulseAudio; and
September/002347.html where a PulseAudio developer diagnoses the problem as being within ALSA.
For convenience, the following is from the latter post:
"So, what happens here is this: your device can only do non-interleaved audio and is hence configured for it (as we can see from that "slave setup" listing above). Because your hardware lacks a hardware volume control ALSA puts "softvol" on top of the hw device: the "Soft Volume PCM" you can see in the first part. That device is initialized for interleaved audio as you can see. Which is what PA supports and PA asked for.
Now, if softval takes non-interleaved from below and gives interleaved to the layer above than it would need to rearrange those samples -- which it however doesn't actually. PA hence checks with those asserts if the audio data is properly arranged -- which it is not as we can see.
This is a bug in ALSA's softvol module. Please report this on alsa-devel. softvol falsely claims to be able to rearrange non-interleaved audio to interleaved."
Not sure what other information I should post here so I'll wait for any feedback.
Well, it's no bug in softvol, at least. The softvol doesn't do any format or layout conversions. The layout conversion is done via plug plugin applied onto the softvol.
Takashi
Hi Takashi,
On Fri, 5 Sep 2008, Takashi Iwai opined:
Well, it's no bug in softvol, at least. The softvol doesn't do any format or layout conversions. The layout conversion is done via plug plugin applied onto the softvol.
OK (not that I fully understand what you have said) but where does that leave me? Is there something that I should try? Some ALSA or kernel configuration option that might be in error?
Kevin
On Fri, 05.09.08 21:02, Kevin Gilbert (kevin952@tpg.com.au) wrote:
Hi Takashi,
On Fri, 5 Sep 2008, Takashi Iwai opined:
Well, it's no bug in softvol, at least. The softvol doesn't do any format or layout conversions. The layout conversion is done via plug plugin applied onto the softvol.
OK (not that I fully understand what you have said) but where does that leave me? Is there something that I should try? Some ALSA or kernel configuration option that might be in error?
Takashi, as Kevin wrote originally, the problem is not that softvol doesn't do any format/layout conversions, but that it claims it does. PA asks softvol for INTERLEAVED samples, softvol agrees to that -- and actually hands us only NONINTERLEAVED samples because it doesn't reformat the from the underlying layer.
So, it *is* a bug in softvol. However, you are right that it doesn't do any conversions.
Lennart
At Mon, 8 Sep 2008 22:21:36 +0200, Lennart Poettering wrote:
On Fri, 05.09.08 21:02, Kevin Gilbert (kevin952@tpg.com.au) wrote:
Hi Takashi,
On Fri, 5 Sep 2008, Takashi Iwai opined:
Well, it's no bug in softvol, at least. The softvol doesn't do any format or layout conversions. The layout conversion is done via plug plugin applied onto the softvol.
OK (not that I fully understand what you have said) but where does that leave me? Is there something that I should try? Some ALSA or kernel configuration option that might be in error?
Takashi, as Kevin wrote originally, the problem is not that softvol doesn't do any format/layout conversions, but that it claims it does. PA asks softvol for INTERLEAVED samples, softvol agrees to that -- and actually hands us only NONINTERLEAVED samples because it doesn't reformat the from the underlying layer.
So, it *is* a bug in softvol. However, you are right that it doesn't do any conversions.
Does it happen only with softvol? For example, try to put any other conversion, such as, linear plugin instead of softvol. Could you check whether it works?
Basically softvol does nothing special, just like other normal plugins. So I don't think this is specific to softvol.
Takashi
On Tue, 9 Sep 2008, Takashi Iwai wrote:
At Mon, 8 Sep 2008 22:21:36 +0200, Lennart Poettering wrote:
On Fri, 05.09.08 21:02, Kevin Gilbert (kevin952@tpg.com.au) wrote:
Hi Takashi,
On Fri, 5 Sep 2008, Takashi Iwai opined:
Well, it's no bug in softvol, at least. The softvol doesn't do any format or layout conversions. The layout conversion is done via plug plugin applied onto the softvol.
OK (not that I fully understand what you have said) but where does that leave me? Is there something that I should try? Some ALSA or kernel configuration option that might be in error?
Takashi, as Kevin wrote originally, the problem is not that softvol doesn't do any format/layout conversions, but that it claims it does. PA asks softvol for INTERLEAVED samples, softvol agrees to that -- and actually hands us only NONINTERLEAVED samples because it doesn't reformat the from the underlying layer.
So, it *is* a bug in softvol. However, you are right that it doesn't do any conversions.
Does it happen only with softvol? For example, try to put any other conversion, such as, linear plugin instead of softvol. Could you check whether it works?
Basically softvol does nothing special, just like other normal plugins. So I don't think this is specific to softvol.
Also, output from snd_pcm_dump() after initialization (before samples r/w) might help us to determine the problem. I'll try to reproduce this behavior with the snd-dummy module.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Tue, 9 Sep 2008, Jaroslav Kysela wrote:
On Tue, 9 Sep 2008, Takashi Iwai wrote:
At Mon, 8 Sep 2008 22:21:36 +0200, Lennart Poettering wrote:
Takashi, as Kevin wrote originally, the problem is not that softvol doesn't do any format/layout conversions, but that it claims it does. PA asks softvol for INTERLEAVED samples, softvol agrees to that -- and actually hands us only NONINTERLEAVED samples because it doesn't reformat the from the underlying layer.
So, it *is* a bug in softvol. However, you are right that it doesn't do any conversions.
Does it happen only with softvol? For example, try to put any other conversion, such as, linear plugin instead of softvol. Could you check whether it works?
Basically softvol does nothing special, just like other normal plugins. So I don't think this is specific to softvol.
Also, output from snd_pcm_dump() after initialization (before samples r/w) might help us to determine the problem. I'll try to reproduce this behavior with the snd-dummy module.
I found the culprit. Lennart was right. The softvol plugin does in-place sample recalculation, thus it cannot change the access type as a side effect (which is true for linear plugins).
The fix is available here:
http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=a13707da6bb0161db855a...
Also, for debugging purposes, I added snd_pcm_channel_area_t dump to aplay:
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=6bd621177dea5afd742...
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
At Tue, 9 Sep 2008 13:17:06 +0200 (CEST), Jaroslav Kysela wrote:
On Tue, 9 Sep 2008, Jaroslav Kysela wrote:
On Tue, 9 Sep 2008, Takashi Iwai wrote:
At Mon, 8 Sep 2008 22:21:36 +0200, Lennart Poettering wrote:
Takashi, as Kevin wrote originally, the problem is not that softvol doesn't do any format/layout conversions, but that it claims it does. PA asks softvol for INTERLEAVED samples, softvol agrees to that -- and actually hands us only NONINTERLEAVED samples because it doesn't reformat the from the underlying layer.
So, it *is* a bug in softvol. However, you are right that it doesn't do any conversions.
Does it happen only with softvol? For example, try to put any other conversion, such as, linear plugin instead of softvol. Could you check whether it works?
Basically softvol does nothing special, just like other normal plugins. So I don't think this is specific to softvol.
Also, output from snd_pcm_dump() after initialization (before samples r/w) might help us to determine the problem. I'll try to reproduce this behavior with the snd-dummy module.
I found the culprit. Lennart was right. The softvol plugin does in-place sample recalculation, thus it cannot change the access type as a side effect (which is true for linear plugins).
Ah, right, that's around mmap shadowing.
The fix is available here:
http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=a13707da6bb0161db855a...
Also, for debugging purposes, I added snd_pcm_channel_area_t dump to aplay:
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=6bd621177dea5afd742...
Thanks!
Takashi
participants (4)
-
Jaroslav Kysela
-
Kevin Gilbert
-
Lennart Poettering
-
Takashi Iwai