alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* question on snd_soc_jack_report
@ 2011-01-14 11:40 Harsha, Priya
  2011-01-14 12:00 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Harsha, Priya @ 2011-01-14 11:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel@alsa-project.org

Hi,

I am using snd_soc_jack_report and I send the parameter as follows to report
headphones.

struct snd_soc_jack *soc_jack;
snd_soc_jack_report (soc_jack, SND_JACK_HEADPHONE, SND_JACK_HEADPHONE);

I don't find the reporting to be happening. When I looked at the snd_jack_report 
code, I found that jack->type needs to be set and that was not being set.
So when I added the following line in my code, it started reporting.
soc_jack->jack->type = SND_JACK_HEADPHONE;

Is it expected that the driver sets the 'type' of the instance of 'snd_jack' inside 
snd_soc_jack structure. I was actually thinking that snd_soc_jack_report would 
need to do this.

I did not find any other drivers doing that. Is there something that I am 
missing?

Also, to report button press events, I had to add the following line of code
soc_jack->jack->key[0] = BTN_0;
Is this also an expected thing to be set.

-Harsha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-14 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 11:40 question on snd_soc_jack_report Harsha, Priya
2011-01-14 12:00 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).