[alsa-devel] switching pcm devices dynamically when using dmix
Hi,
I'm wondering if the following is possible.
If I have my asound.conf configured in such a way that
pcm.media {
}
route to hw:0,0 throuh dmix.
can I dynamically change the device to hw:0,1 or hw:1,0 if necessary?
Thanks!
At Wed, 3 Aug 2011 15:13:09 -0700, Baek Chang wrote:
Hi,
I'm wondering if the following is possible.
If I have my asound.conf configured in such a way that
pcm.media {
}
route to hw:0,0 throuh dmix.
can I dynamically change the device to hw:0,1 or hw:1,0 if necessary?
Not possible with the current implementation. For such a purpose, better to use PulseAudio.
Takashi
Would it be possible to implement this feature in another plugin? For example, some plugin called "switch", that would take a parameter for device or card name/number that would close the current device and open the new requested device? Would this be worth investigating?
Thanks!
On Mon, Aug 8, 2011 at 5:40 AM, Takashi Iwai tiwai@suse.de wrote:
At Wed, 3 Aug 2011 15:13:09 -0700, Baek Chang wrote:
Hi,
I'm wondering if the following is possible.
If I have my asound.conf configured in such a way that
pcm.media {
}
route to hw:0,0 throuh dmix.
can I dynamically change the device to hw:0,1 or hw:1,0 if necessary?
Not possible with the current implementation. For such a purpose, better to use PulseAudio.
Takashi
At Mon, 8 Aug 2011 09:08:49 -0700, Baek Chang wrote:
Would it be possible to implement this feature in another plugin? For example, some plugin called "switch", that would take a parameter for device or card name/number that would close the current device and open the new requested device? Would this be worth investigating?
The question is whether it allows the dynamic switch of the running PCM stream. If yes, it'd be tough to implement, I suppose. OTOH, if it handles only the switch for the next open, it'd be just to change the configuration, so it sounds feasible.
Takashi
Thanks!
On Mon, Aug 8, 2011 at 5:40 AM, Takashi Iwai tiwai@suse.de wrote:
At Wed, 3 Aug 2011 15:13:09 -0700, Baek Chang wrote:
Hi,
I'm wondering if the following is possible.
If I have my asound.conf configured in such a way that
pcm.media {
}
route to hw:0,0 throuh dmix.
can I dynamically change the device to hw:0,1 or hw:1,0 if necessary?
Not possible with the current implementation. For such a purpose, better to use PulseAudio.
Takashi
-- -baeksanchang [2 <text/html; ISO-8859-1 (quoted-printable)>]
On Mon, 2011-08-08 at 18:16 +0200, Takashi Iwai wrote:
At Mon, 8 Aug 2011 09:08:49 -0700, Baek Chang wrote:
Would it be possible to implement this feature in another plugin? For example, some plugin called "switch", that would take a parameter for device or card name/number that would close the current device and open the new requested device? Would this be worth investigating?
The question is whether it allows the dynamic switch of the running PCM stream. If yes, it'd be tough to implement, I suppose. OTOH, if it handles only the switch for the next open, it'd be just to change the configuration, so it sounds feasible.
Fwiw, the ASoC dynamic PCM code does something a little similar and can dynamically remap the PCM stream to different backend DAIs (e.g. McBSP, McPDM, McASP etc) at runtime based on kcontrol mixer settings. This wont help for routing between cards but could be useful for routing between different physical DAIs on the same card.
Liam
I'll have a look at the dynamic PCM code. That is a fairly new feature correct? Perhaps I can use that as an example.
OTOH, if it handles only the switch for the next open, it'd be just to change the configuration, so it sounds feasible.
This is mainly my goal. User application would know when this is switching, close the current device, reconfigure, open the new device and then continue streaming.
On Mon, Aug 8, 2011 at 9:35 AM, Liam Girdwood lrg@ti.com wrote:
On Mon, 2011-08-08 at 18:16 +0200, Takashi Iwai wrote:
At Mon, 8 Aug 2011 09:08:49 -0700, Baek Chang wrote:
Would it be possible to implement this feature in another plugin? For example, some plugin called "switch", that would take a parameter for
device
or card name/number that would close the current device and open the
new
requested device? Would this be worth investigating?
The question is whether it allows the dynamic switch of the running PCM stream. If yes, it'd be tough to implement, I suppose. OTOH, if it handles only the switch for the next open, it'd be just to change the configuration, so it sounds feasible.
Fwiw, the ASoC dynamic PCM code does something a little similar and can dynamically remap the PCM stream to different backend DAIs (e.g. McBSP, McPDM, McASP etc) at runtime based on kcontrol mixer settings. This wont help for routing between cards but could be useful for routing between different physical DAIs on the same card.
Liam
participants (3)
-
Baek Chang
-
Liam Girdwood
-
Takashi Iwai