lkml.org 
[lkml]   [2017]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Nokia N900 headset detection & MIC Bias + TVOUT
On Monday 09 January 2017 11:27:49 Mark Brown wrote:
> On Sat, Jan 07, 2017 at 12:07:49AM +0100, Pali Rohár wrote:
>
> > All that is needed in N900 sound driver, file sound/soc/omap/rx51.c. Can
> > you help me which functions should I call to enable/disable it
> > correctly? In headset detection code I need to be sure that nobody
> > (other kernel drivers or userspace via alsamixer) except current
> > function could change Bias settings.
>
> > MIC Bias is controlled by MICBIAS_CTRL in aic34 'B' part codec, file
> > tlv320aic3x.c.
>
> Microphone biases are normally controlled by supply widgets and managed
> via DAPM. You can see quite a few examples of this in existing drivers.

So... can I call snd_soc_dapm_mutex_lock(dapm) at function startup,
start doing cable detection and when needed call this?

snd_soc_dapm_enable_pin_unlocked(dapm, "HS Mic");
snd_soc_dapm_sync_unlocked(dapm);

And at the end of function revert back "HS Mic" pin status and call
snd_soc_dapm_mutex_unlock(dapm)?

--
Pali Rohár
pali.rohar@gmail.com

\
 
 \ /
  Last update: 2017-01-09 14:16    [W:0.062 / U:2.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site