Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
On Monday 09 January 2017 20:38:28 Mark Brown wrote: > On Mon, Jan 09, 2017 at 08:29:53PM +0100, Pali Rohár wrote: > > On Monday 09 January 2017 20:22:01 Mark Brown wrote: > > > point where you need an actual change. Note that if something > > > holds the microphone bias on (like something using

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
On Monday 09 January 2017 20:38:28 Mark Brown wrote: > On Mon, Jan 09, 2017 at 08:29:53PM +0100, Pali Rohár wrote: > > On Monday 09 January 2017 20:22:01 Mark Brown wrote: > > > point where you need an actual change. Note that if something > > > holds the microphone bias on (like something using

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
On Mon, Jan 09, 2017 at 08:29:53PM +0100, Pali Rohár wrote: > On Monday 09 January 2017 20:22:01 Mark Brown wrote: > > point where you need an actual change. Note that if something holds > > the microphone bias on (like something using the microphone) > > separately then that'll take effect so

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
On Mon, Jan 09, 2017 at 08:29:53PM +0100, Pali Rohár wrote: > On Monday 09 January 2017 20:22:01 Mark Brown wrote: > > point where you need an actual change. Note that if something holds > > the microphone bias on (like something using the microphone) > > separately then that'll take effect so

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
On Monday 09 January 2017 20:22:01 Mark Brown wrote: > On Mon, Jan 09, 2017 at 02:13:17PM +0100, Pali Rohár wrote: > > 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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
On Monday 09 January 2017 20:22:01 Mark Brown wrote: > On Mon, Jan 09, 2017 at 02:13:17PM +0100, Pali Rohár wrote: > > 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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
On Mon, Jan 09, 2017 at 02:13:17PM +0100, Pali Rohár wrote: > 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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
On Mon, Jan 09, 2017 at 02:13:17PM +0100, Pali Rohár wrote: > 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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Pali Rohár
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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
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

Re: Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-09 Thread Mark Brown
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

Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-06 Thread Pali Rohár
Hi! For jack cable and headset detection in Nokia N900 I would need to enable/disable MIC Bias and also enable/disable TVOUT output. 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

Nokia N900 headset detection & MIC Bias + TVOUT

2017-01-06 Thread Pali Rohár
Hi! For jack cable and headset detection in Nokia N900 I would need to enable/disable MIC Bias and also enable/disable TVOUT output. 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