* Jack insertion
@ 2008-11-18 6:46 naveen krishna ch
2008-11-18 9:23 ` Trilok Soni
2008-11-18 11:03 ` Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: naveen krishna ch @ 2008-11-18 6:46 UTC (permalink / raw)
To: alsa-devel, linux-omap-open-source, linux-omap
Hello Alsa Devels
I am working on a OMAP3 + TWL4030 combination for audio (alsa soc)
I could develop the ASOC drivers with limited kcontorls and DAPM widgets for
the setup.
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.
Thank You,
(: Naveen Krishna Ch :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Jack insertion
2008-11-18 6:46 Jack insertion naveen krishna ch
@ 2008-11-18 9:23 ` Trilok Soni
2008-11-18 11:03 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Trilok Soni @ 2008-11-18 9:23 UTC (permalink / raw)
To: naveen krishna ch; +Cc: alsa-devel, linux-omap-open-source, linux-omap
Hi Naveen,
On Tue, Nov 18, 2008 at 12:16 PM, naveen krishna ch
<naveenkrishna.ch@gmail.com> wrote:
> Hello Alsa Devels
>
> I am working on a OMAP3 + TWL4030 combination for audio (alsa soc)
> I could develop the ASOC drivers with limited kcontorls and DAPM widgets for
> the setup.
>
> Now my issue is is there any work regarding the Headset JACK
> insertion/detection.
Check Jack Abstraction layer by Mark, it is already mainlined:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/sound/jack.h;h=b1b2b8b59adbe67d7efb817b09f7b985ad0422e7;hb=HEAD
--
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Jack insertion
2008-11-18 6:46 Jack insertion naveen krishna ch
2008-11-18 9:23 ` Trilok Soni
@ 2008-11-18 11:03 ` Mark Brown
2008-11-18 13:37 ` naveen krishna ch
1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2008-11-18 11:03 UTC (permalink / raw)
To: naveen krishna ch; +Cc: alsa-devel, linux-omap, linux-omap-open-source
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Jack insertion
2008-11-18 11:03 ` Mark Brown
@ 2008-11-18 13:37 ` naveen krishna ch
2008-11-18 13:48 ` naveen krishna ch
2008-11-18 13:57 ` Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: naveen krishna ch @ 2008-11-18 13:37 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, linux-omap-open-source
On Tue, Nov 18, 2008 at 4:33 PM, Mark Brown <broonie@sirena.org.uk> 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 :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Jack insertion
2008-11-18 13:37 ` naveen krishna ch
@ 2008-11-18 13:48 ` naveen krishna ch
2008-11-18 13:57 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: naveen krishna ch @ 2008-11-18 13:48 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, linux-omap-open-source
On Tue, Nov 18, 2008 at 7:07 PM, naveen krishna ch <
naveenkrishna.ch@gmail.com> wrote:
>
>
> On Tue, Nov 18, 2008 at 4:33 PM, Mark Brown <broonie@sirena.org.uk> 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.
>>
>
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
>
>> 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.
>
> In my case the Headset detect gpio is not from the machine (OMAP3) but from
> the CODEC(TWL4030) itself. Is there any previous case liek this
>
> --
> Thanks,
> (: Naveen Krishna Ch :)
>
--
Thanks,
(: Naveen Krishna Ch :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Jack insertion
2008-11-18 13:37 ` naveen krishna ch
2008-11-18 13:48 ` naveen krishna ch
@ 2008-11-18 13:57 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2008-11-18 13:57 UTC (permalink / raw)
To: naveen krishna ch; +Cc: alsa-devel, linux-omap-open-source
On Tue, Nov 18, 2008 at 07:07:41PM +0530, naveen krishna ch wrote:
> 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 */
Look at how you register a jack - it's with the snd_card and....
> The latest ALSA SOC drivers ( In my case my driver ) uses
> struct snd_soc_device {
...the ASoC device is just a particular way of implementing the generic
snd_card and has a snd_card as a member.
> 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
You can use the snd_card of the ASoC card directly.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-18 13:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 6:46 Jack insertion naveen krishna ch
2008-11-18 9:23 ` Trilok Soni
2008-11-18 11:03 ` Mark Brown
2008-11-18 13:37 ` naveen krishna ch
2008-11-18 13:48 ` naveen krishna ch
2008-11-18 13:57 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.