[Bug 405354] New: pulseaudio under Gnome blocks some Alsa audio output
https://bugzilla.novell.com/show_bug.cgi?id=405354 Summary: pulseaudio under Gnome blocks some Alsa audio output Product: openSUSE 11.0 Version: Final Platform: i586 OS/Version: openSUSE 11.0 Status: NEW Severity: Normal Priority: P5 - None Component: Sound AssignedTo: tiwai@novell.com ReportedBy: wolfgang@rosenauer.org QAContact: qa@suse.de CC: rodrigo@novell.com Found By: --- I'm working on a closed source appliation which uses alsa for audio output. That worked up to 10.3 but stopped with 11.0 under Gnome which suggests that it is an issue between alsa and pulse audio. I haven't written the alsa code myself but it is pretty minimalistic currently: Adding some snippets here: int rc = snd_pcm_open(&mHandle, settings.value("audio/device", "default").toByteArray(), SND_PCM_STREAM_PLAYBACK, SND_PCM_ASYNC); snd_pcm_hw_params_t* params = NULL; snd_pcm_hw_params_alloca(¶ms); snd_pcm_hw_params_any(mHandle, params); snd_pcm_hw_params_set_access(mHandle, params, SND_PCM_ACCESS_RW_INTERLEAVED); I'm also investigating here to find out where it fails. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=405354
User tiwai@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c1
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c2
Wolfgang Rosenauer
int rc = snd_pcm_open(&mHandle, settings.value("audio/device", "default").toByteArray(), SND_PCM_STREAM_PLAYBACK, SND_PCM_ASYNC);
(In reply to comment #1 from Takashi Iwai)
The async handler doesn't work with pulse plugin. If your code uses it, no chance that it'll work with pulse or any other external plugins. (That's why flash also doesn't work with alsa-pulse plugin.)
So I guess the above flag defines to use the async handler? I see no other definitions. Output is done with snd_pcm_writei(). Thanks for the hint. (BTW: why does Flash work then at all? Is there some workaround?) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=405354
User tiwai@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c3
--- Comment #3 from Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=405354
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c4
--- Comment #4 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c5
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=405354
User tiwai@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c6
Takashi Iwai
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c7
Wolfgang Rosenauer
Hm, this sounds like rather a problem in the app code. Is the start_threshold set properly?
That could really be an app issue. It's just that it always worked before pulseaudio was introduced. We used snd_pcm_start() to activate the stream but I've changed that to use start_threshold=64 (which is the number of frames per period AFAICS) with no change in behaviour.
snd_pcm_writei() doesn't care whether the samples are played or not. It cares only where the samples are put on the buffer or not.
So what could hold alsa from actually playing its buffer? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c8
--- Comment #8 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c9
--- Comment #9 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=405354
User wolfgang@rosenauer.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=405354#c10
Wolfgang Rosenauer
participants (1)
-
bugzilla_noreply@novell.com