Re: Jack insertion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 18, 2008 at 4:33 PM, Mark Brown <broonie@xxxxxxxxxxxxx> wrote:

> On Tue, Nov 18, 2008 at 12:16:18PM +0530, naveen krishna ch wrote:
>
> > Now my issue is is there any work regarding the Headset JACK
> > insertion/detection.
>
> > Earlier there was a proposal for a jack insertion layer.
>
> > Can anyone suggest me in this regard.
>
> The generic ALSA part of the API has been merged already - see
> include/sound/jack.h.
>
> For ASoC drivers you need to implement the actual detection in your
> machine driver.  Normally this would just hook into a GPIO.  You can
> then update the DAPM widget for the jack to mark it as in use or not in
> use (some existing drivers do this) and also hook into the generic
> userspace API (that's not been implemented by anyone yet).  Plan is to
> get something more generic into 2.6.30.


Thanks for  your early reply. I am a new to this SOC i started developing
the driver taking the  Gumsitcs OVERO  + TWL4030 ASOC codec driver as
reference.

But, i see the jack layer uses the structure

struct snd_device {
        struct list_head list;          /* list of registered devices */
        struct snd_card *card;          /* card which holds this device */
        snd_device_state_t state;       /* state of the device */
        snd_device_type_t type;         /* device type */
        void *device_data;              /* device structure */
        struct snd_device_ops *ops;     /* operations */
};

The latest ALSA SOC drivers ( In my case my driver ) uses

struct snd_soc_device {
        struct device *dev;
        struct snd_soc_machine *machine;
        struct snd_soc_platform *platform;
        struct snd_soc_codec *codec;
        struct snd_soc_codec_device *codec_dev;
        struct delayed_work delayed_work;
        struct work_struct deferred_resume_work;
         void *codec_data;
};

in this case what shall i do to make use of the jack abstraction layer.
If cant use the jack abstraction layer, can any one suggest me the other way
out

-- 
Thanks,
(: Naveen Krishna Ch :)
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux