All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver
@ 2011-01-19 12:47 Harsha Priya
  2011-01-19 14:24 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Harsha Priya @ 2011-01-19 12:47 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Vinod Koul, broonie, lrg

From: Vinod Koul <vinod.koul@intel.com>

This configures the capture unused pins and sets
the DMIC cfg by default (also done by user)

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/mid-x86/mfld_machine.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c
index 1a330be..1cd49a2 100644
--- a/sound/soc/mid-x86/mfld_machine.c
+++ b/sound/soc/mid-x86/mfld_machine.c
@@ -182,6 +182,13 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
 	snd_soc_dapm_disable_pin(dapm, "LINEOUTR");
 	lo_dac = 3;
 	hs_switch = 0;
+	/* we dont use linein in this so set to NC */
+	snd_soc_dapm_disable_pin(dapm, "LINEINL");
+	snd_soc_dapm_disable_pin(dapm, "LINEINR");
+	/* we are using DMICs here so configure how the clock and out pin is set */
+	snd_soc_write(codec, SN95031_DMICBUF0123, 0x85);
+	snd_soc_write(codec, SN95031_DMICBUF45, 0x02);
+	snd_soc_update_bits(codec, SN95031_DMICMUX, 0x7, 0x07);
 	return snd_soc_dapm_sync(dapm);
 }
 
-- 
1.7.2.3

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

* Re: [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver
  2011-01-19 12:47 [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver Harsha Priya
@ 2011-01-19 14:24 ` Mark Brown
  2011-01-19 16:29   ` Koul, Vinod
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-01-19 14:24 UTC (permalink / raw)
  To: Harsha Priya; +Cc: tiwai, Vinod Koul, alsa-devel, lrg

On Wed, Jan 19, 2011 at 06:17:01PM +0530, Harsha Priya wrote:

> +	/* we are using DMICs here so configure how the clock and out pin is set */
> +	snd_soc_write(codec, SN95031_DMICBUF0123, 0x85);
> +	snd_soc_write(codec, SN95031_DMICBUF45, 0x02);
> +	snd_soc_update_bits(codec, SN95031_DMICMUX, 0x7, 0x07);

This looks like something which would more normally be done with
platform data than with writes in the machine driver.

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

* Re: [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver
  2011-01-19 14:24 ` Mark Brown
@ 2011-01-19 16:29   ` Koul, Vinod
  2011-01-19 16:36     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Koul, Vinod @ 2011-01-19 16:29 UTC (permalink / raw)
  To: Mark Brown, Harsha, Priya; +Cc: tiwai, alsa-devel, lrg

> 
> > +	/* we are using DMICs here so configure how the clock and out pin is set
> */
> > +	snd_soc_write(codec, SN95031_DMICBUF0123, 0x85);
> > +	snd_soc_write(codec, SN95031_DMICBUF45, 0x02);
> > +	snd_soc_update_bits(codec, SN95031_DMICMUX, 0x7, 0x07);
> 
> This looks like something which would more normally be done with
> platform data than with writes in the machine driver.
This is actually optional. The DMIC can be used as GPO or DMIC. This is user option.
Wanted to explicitly code here as this machine DMICs are used.

~Vinod

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

* Re: [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver
  2011-01-19 16:29   ` Koul, Vinod
@ 2011-01-19 16:36     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-01-19 16:36 UTC (permalink / raw)
  To: Koul, Vinod; +Cc: tiwai, alsa-devel, Harsha, Priya, lrg

On Wed, Jan 19, 2011 at 09:59:59PM +0530, Koul, Vinod wrote:

> > > +	/* we are using DMICs here so configure how the clock and out pin is set
> > */
> > > +	snd_soc_write(codec, SN95031_DMICBUF0123, 0x85);
> > > +	snd_soc_write(codec, SN95031_DMICBUF45, 0x02);
> > > +	snd_soc_update_bits(codec, SN95031_DMICMUX, 0x7, 0x07);

> > This looks like something which would more normally be done with
> > platform data than with writes in the machine driver.

> This is actually optional. The DMIC can be used as GPO or DMIC. This is user option.
> Wanted to explicitly code here as this machine DMICs are used.

I'm not saying it shouldn't be optional, I'm saying it should be passed
into the driver using platform data instead.

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

* [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver
@ 2011-01-19 12:48 Harsha Priya
  0 siblings, 0 replies; 5+ messages in thread
From: Harsha Priya @ 2011-01-19 12:48 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Vinod Koul, broonie, lrg

From: Vinod Koul <vinod.koul@intel.com>

This configures the capture unused pins and sets
the DMIC cfg by default (also done by user)

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/mid-x86/mfld_machine.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c
index 1a330be..1cd49a2 100644
--- a/sound/soc/mid-x86/mfld_machine.c
+++ b/sound/soc/mid-x86/mfld_machine.c
@@ -182,6 +182,13 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
 	snd_soc_dapm_disable_pin(dapm, "LINEOUTR");
 	lo_dac = 3;
 	hs_switch = 0;
+	/* we dont use linein in this so set to NC */
+	snd_soc_dapm_disable_pin(dapm, "LINEINL");
+	snd_soc_dapm_disable_pin(dapm, "LINEINR");
+	/* we are using DMICs here so configure how the clock and out pin is set */
+	snd_soc_write(codec, SN95031_DMICBUF0123, 0x85);
+	snd_soc_write(codec, SN95031_DMICBUF45, 0x02);
+	snd_soc_update_bits(codec, SN95031_DMICMUX, 0x7, 0x07);
 	return snd_soc_dapm_sync(dapm);
 }
 
-- 
1.7.2.3

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

end of thread, other threads:[~2011-01-19 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-19 12:47 [PATCH 3/4] ASoC: mid-x86: Add support for capture in machine driver Harsha Priya
2011-01-19 14:24 ` Mark Brown
2011-01-19 16:29   ` Koul, Vinod
2011-01-19 16:36     ` Mark Brown
2011-01-19 12:48 Harsha Priya

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.