[alsa-devel] Can we add optional parameters in snd_pcm_hw_params
Hi all,
In my current ALSA driver, I have defined a mode which will impact the configuration of the audio driver. The requirment is to ask application users to set this mode to driver. So I want to add a parameter in 'hwparams' of snd_pcm_hw_params(pcm_handle, hwparams). But it seems that ALSA have no such expansibility.
Basically, my requirment is: There are two modes: ModeA and ModeB. I'd like application to set this mode before it begin playing. If you have other better methods to reach this requirment, it's also welcome. Thanks.
On Tue, Jan 19, 2010 at 09:35:10PM +0800, Raul Xiong wrote:
Basically, my requirment is: There are two modes: ModeA and ModeB. I'd like application to set this mode before it begin playing. If you have other better methods to reach this requirment, it's also welcome. Thanks.
Why not just expose a regular control for this and store the value in your private data?
Thanks Mark.
That's a good idea. But consider below scenario, Assuming I'm implementing a external PCM plug-in. Inside this plug-in there are two working mode. How can the plug-in get the mode parameter?
2010/1/19 Mark Brown broonie@opensource.wolfsonmicro.com
On Tue, Jan 19, 2010 at 09:35:10PM +0800, Raul Xiong wrote:
Basically, my requirment is: There are two modes: ModeA and ModeB. I'd
like
application to set this mode before it begin playing. If you have other better methods to reach this requirment, it's also welcome. Thanks.
Why not just expose a regular control for this and store the value in your private data?
participants (2)
-
Mark Brown
-
Raul Xiong