[alsa-devel] Query about code organization for kernel driver.

Anksh Agarwal anksh.agarwal at gmail.com
Mon May 24 21:47:39 CEST 2010

Hi Everyone,

I am currently working on a custom ARM based board and have succeeded in
running alsa on my target.
In this reference I have some basic queries and would be great if someone
could give me pointers.This would help me in rorganizing the code as per
acceptance from the group.

since we planning to support a list of devices I wanted to keep the
interface independent of
playback/record session.this helps in switching to different devices in
middle of playback. At any point a single device would be enabled.

So i have another driver snd_device.c  which uses sysfs interface to get
device index or name to enable/disable device. The reason for this was that
we could
reuse a lot of code from the alsa-plugin(maemo). But then will it be right
to put
the device enable/disable code under sound/soc/xxxx/snd_device.c path,
or can we split and place it seperately under sound/driver/xxxx/snd_device.c
or any other suggested directory?

i am not aware how to split the audio path enable/disable code from the soc
and which would be ideal directory to place them, since there is hardly any
between playback and device enable/disable routines? I think the device
enable/disable code outside sound/ directory wont be a good idea as its
to be specifically used by alsa playback/record only.

please suggest as this would help me a lot. Also let me know if any more
info would help to get to a better conclusion.

Really appreciate all the help.


More information about the Alsa-devel mailing list