Mailinglist Archive: opensuse-factory (949 mails)
| < Previous | Next > |
[opensuse-factory] Pulseaudio with dmix
- From: Takashi Iwai <tiwai@xxxxxxx>
- Date: Wed, 19 Aug 2009 15:21:28 +0200
- Message-id: <s5hiqgkaqhz.wl%tiwai@xxxxxxx>
Hi,
while I also have been annoyed sometimes by the blocking behavior of
Pulseaudio, I tried to hack it yesterday a bit, to cope with ALSA
dmix.
Basically, PA itself can run well with dmix PCM when explicitly
specified at loading module-alsa-{sink,source} modules. But, this
requires the change of the system-wide config file, and also it
doesn't work with HAL detection.
What I've done is to add a new option, pcm_default, to
module-hal-detect and module-alsa-card modules. When this option is
set to 1, "default" PCM (normally dmix) is taken instead of "hw" and
other exclusive accesses that PA usually prefers. This is an easy
part.
Now, the question is how gracefully integrating this into the system.
You may have both GNOME and KDE (or whatever else) on a single system.
Thus it's not wise to change the system default only for dmix or not.
Also, it's not sexy to copy the whole /etc/default.pa at each time
(think of updating packages). And, PA has no config files to specify
module options.
As a workaround, I extended the PA config parser to allow the nested
if/else/endif, and accept the path like ~/foo. With these extensions,
/etc/default.pa can have a block like the following:
.ifexists ~/.pulse-detect
.include ~/.pulse-detect
.else
.... normal detection ...
.endif
Now, just put the following line into your ~/.pulse-detect, PA works
with dmix without breaking any others:
load module-hal-detect pcm_default=1
If ~/.pulse-detect doesn't exist, the system-wide detection will be
used (i.e. for GNOME).
Test packages can be found in OBS
home:tiwai:branches:multimedia:libs/pulseaudio repo.
(FACTORY packages don't seem to be built yet, though.)
The new patches are found as pulse-*.diff.
This is a pure hack done in a couple of hours, and there is no
guarantee that the upstream will be satisfied with it. So, I'm not
sure whether we should take this to FACTORY now or not.
But, at least, it'd be better for them to keep PA than dropping
completely...
Any comments / suggestions / test reports appreciated.
thanks,
Takashi
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
while I also have been annoyed sometimes by the blocking behavior of
Pulseaudio, I tried to hack it yesterday a bit, to cope with ALSA
dmix.
Basically, PA itself can run well with dmix PCM when explicitly
specified at loading module-alsa-{sink,source} modules. But, this
requires the change of the system-wide config file, and also it
doesn't work with HAL detection.
What I've done is to add a new option, pcm_default, to
module-hal-detect and module-alsa-card modules. When this option is
set to 1, "default" PCM (normally dmix) is taken instead of "hw" and
other exclusive accesses that PA usually prefers. This is an easy
part.
Now, the question is how gracefully integrating this into the system.
You may have both GNOME and KDE (or whatever else) on a single system.
Thus it's not wise to change the system default only for dmix or not.
Also, it's not sexy to copy the whole /etc/default.pa at each time
(think of updating packages). And, PA has no config files to specify
module options.
As a workaround, I extended the PA config parser to allow the nested
if/else/endif, and accept the path like ~/foo. With these extensions,
/etc/default.pa can have a block like the following:
.ifexists ~/.pulse-detect
.include ~/.pulse-detect
.else
.... normal detection ...
.endif
Now, just put the following line into your ~/.pulse-detect, PA works
with dmix without breaking any others:
load module-hal-detect pcm_default=1
If ~/.pulse-detect doesn't exist, the system-wide detection will be
used (i.e. for GNOME).
Test packages can be found in OBS
home:tiwai:branches:multimedia:libs/pulseaudio repo.
(FACTORY packages don't seem to be built yet, though.)
The new patches are found as pulse-*.diff.
This is a pure hack done in a couple of hours, and there is no
guarantee that the upstream will be satisfied with it. So, I'm not
sure whether we should take this to FACTORY now or not.
But, at least, it'd be better for them to keep PA than dropping
completely...
Any comments / suggestions / test reports appreciated.
thanks,
Takashi
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
| < Previous | Next > |