On Fri, Apr 15, 2011 at 01:46:41PM +0800, Shreshtha wrote:
Hi, I am completely new to ALSA and ASoC so my question formation may seems vague but I will try to be clear in objective. How can I access already detected/populated sound card from inside the kernel using standard ALSA kernel APIs? Any mapping of kernel api for the following steps -
Find the right ALSA-card. (using snd_card_create)
Find the wanted ALSA-control for this card with snd_ctl_find_numid(...).
Modify the control
I want to configure the vibrator from kernel using the ALSA kernel APIs.
From user space alsa_amixer -Dhw set/sset "vibra command" "..." I want to do it from kernel space using ALSA apis.
Why would you do that in kernel?
I don't think you should access it directly in subsystem other than sound subsystem. Your scenario is very much like directly access an opened file in kernel, which should be prohibited.
I'm afraid you can notify the userspace in kernel when you want to do such kind of changes, and then let the userspace program issue the command and change it for you. It's much clear.
BR Mickey _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel