[alsa-devel] [PATCH] [RFC 8/13] Intel SST sound card driver

Harsha, Priya priya.harsha at intel.com
Sat Aug 1 05:15:31 CEST 2009


In my probe function, after adding the controls, I added the following code

	retval = snd_jack_new(intelmaddata->card, "Headphone",
				SND_JACK_HEADPHONE, &jack);
	if (retval < 0)
		return retval;
	jack->private_data = jack;
	snd_jack_report(jack, jack->type);

	retval = snd_jack_new(intelmaddata->card, "Headset",
				SND_JACK_HEADSET, &jack);
	if (retval < 0)
		return retval;
	jack->private_data = jack;
	snd_jack_report(jack, jack->type);

But I do not see any jacks in /dev/input.... Am I missing anything?

Thanks,
Harsha.
>-----Original Message-----
>From: Mark Brown [mailto:broonie at opensource.wolfsonmicro.com]
>Sent: Friday, July 17, 2009 3:48 PM
>To: Harsha, Priya
>Cc: Koul, Vinod; alsa-devel at alsa-project.org
>Subject: Re: [alsa-devel] [PATCH] [RFC 8/13] Intel SST sound card driver
>
>On Fri, Jul 17, 2009 at 12:31:25PM +0530, Harsha, Priya wrote:
>
>> I was looking into creating jack sense device. I see that I can create
>> jack sense for headphones/headset/mic etc,. but if I want to send events
>> like long press and short press of headset keys, can I use this same
>> framework in someway? Is there any way to event these kinds of actions
>> to user space through ALSA?
>
>The intention was that buttons would be reported as normal buttons,
>probably BTN_MISC.  Nobody has merged a driver with short detection yet
>so it's not been added to the jack API yet but that's a fairly trivial
>mapping.
>
>Within the input API buttons just have pressed and released states so as
>unless there's something I'm not aware of you'll need to manually create
>different press lengths with a timer.


More information about the Alsa-devel mailing list