Hi, On Jan 28 2016 14:14, Prashant Jain wrote: > We are required to switch stream running on analog headset to usb > headset when usb headset is plugged in. Through udev rules, I can > detect plugging in-out of usb headset. Is there any way in alsa to > transfer the running stream from one card to another, through command line. As long as I know, no way in ALSA. I think you use API in alsa-lib. When you open PCM handles, the handles are basically assigned to ALSA PCM character devices. Therefore, unless you close the PCM handlers, you cannot use another PCM handler as a target for the PCM substream. Exceptionally, when you use PCM nodes with external plugins such as 'pulse', you can achieve it. In application side, PCM frames are transferred by a single PCM handles, on the other hand, PulseAudio daemon performs what you require. Regards Takashi Sakamoto ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user