All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dong Aisheng-B29396 <B29396@freescale.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"lrg@ti.com" <lrg@ti.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 1/2] ASoC: mxs-saif: add record function
Date: Wed, 24 Aug 2011 11:08:15 +0000	[thread overview]
Message-ID: <65EE16ACC360FA4D99C96DC085B3F772223F4A@039-SN1MPN1-001.039d.mgd.msft.net> (raw)
In-Reply-To: <20110822113054.GC2006@pengutronix.de>

Hi Wolfram,

> -----Original Message-----
> From: Wolfram Sang [mailto:w.sang@pengutronix.de]
> Sent: Monday, August 22, 2011 7:31 PM
> To: Dong Aisheng-B29396
> Cc: alsa-devel@alsa-project.org; linux-arm-kernel@lists.infradead.org;
> broonie@opensource.wolfsonmicro.com; lrg@ti.com; s.hauer@pengutronix.de
> Subject: Re: [PATCH 1/2] ASoC: mxs-saif: add record function
> 
> On Mon, Aug 22, 2011 at 12:02:25AM +0800, Dong Aisheng wrote:
> > 1. add different clkmux mode handling for record.
> > SAIF can use two instances to implement full duplex (playback &
> > recording) and record saif may work on EXTMASTER mode that is using
> > other saif's BITCLK&LRCLK.
> > The clkmux mode is determined by saif's platform data and machine
> > specific clkmux setting is done in pdata->init().
> > 2. support playback and capture simutaneously however the sample rates
> > can not be different due to hw limitation.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > Cc: Liam Girdwood <lrg@ti.com>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Wolfram Sang <w.sang@pengutronix.de>
> 
> Will test and review, but probably not before Wednesday.
> 

If you want to test, you may need to apply another sgtl5000 patch
to fix noise issue.

BTW, since MX28EVK only has line-in (no mic-in), i just tested by
capturing data from line-in and connected the line-in to a PC's
Headphone output.

Not sure if there might be some issue due to line-in level is a
little different from headphone out level.
(Any comments from the person who knows?)

Anyway, it just sounds well at my side.

The patch for your reference:
It's just for testing and I'm going to check it with our ic people
for the root cause.

Regards
Dong Aisheng

>From a29191c7716680966c82132e50356b78f9b1c9b6 Mon Sep 17 00:00:00 2001
From: Dong Aisheng <b29396@freescale.com>
Date: Wed, 17 Aug 2011 21:29:12 +0800
Subject: [PATCH 1/1] sgtl5000: fix record unwork issue

Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
 sound/soc/codecs/sgtl5000.c |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 5a0d8e4..ef52890 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -198,13 +198,13 @@ static int small_pop_event(struct snd_soc_dapm_widget *w,
 {
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
-		snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
-			SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
+//		snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+//			SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
 		break;
 
 	case SND_SOC_DAPM_PRE_PMD:
-		snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
-			SGTL5000_VAG_POWERUP, 0);
+//		snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+//			SGTL5000_VAG_POWERUP, 0);
 		msleep(400);
 		break;
 	default:
@@ -1153,11 +1153,13 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
 				SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
 
 		/* VDDC use VDDIO rail */
-		lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
-		lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
-			    SGTL5000_VDDC_MAN_ASSN_SHIFT;
+//		lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
+//		lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
+//			    SGTL5000_VDDC_MAN_ASSN_SHIFT;
 	}
 
+//	ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP | SGTL5000_VAG_POWERUP | SGTL5000_HP_POWERUP;
+	ana_pwr |= 0x5afb;
 	snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, lreg_ctrl);
 
 	snd_soc_write(codec, SGTL5000_CHIP_ANA_POWER, ana_pwr);
@@ -1194,9 +1196,9 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
 	else
 		vag = (vag - SGTL5000_ANA_GND_BASE) / SGTL5000_ANA_GND_STP;
 
-	snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
-			vag << SGTL5000_ANA_GND_SHIFT,
-			vag << SGTL5000_ANA_GND_SHIFT);
+//	snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
+//			vag << SGTL5000_ANA_GND_SHIFT,
+///			vag << SGTL5000_ANA_GND_SHIFT);
 
 	/* set line out VAG to vddio / 2, in range (0.8v, 1.675v) */
 	vag = vddio / 2;
@@ -1208,14 +1210,15 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
 	else
 		vag = (vag - SGTL5000_LINE_OUT_GND_BASE) /
 		    SGTL5000_LINE_OUT_GND_STP;
-
+#if 1
 	snd_soc_update_bits(codec, SGTL5000_CHIP_LINE_OUT_CTRL,
-			vag << SGTL5000_LINE_OUT_GND_SHIFT |
+//			vag << SGTL5000_LINE_OUT_GND_SHIFT |
 			SGTL5000_LINE_OUT_CURRENT_360u <<
 				SGTL5000_LINE_OUT_CURRENT_SHIFT,
-			vag << SGTL5000_LINE_OUT_GND_SHIFT |
+//			vag << SGTL5000_LINE_OUT_GND_SHIFT |
 			SGTL5000_LINE_OUT_CURRENT_360u <<
 				SGTL5000_LINE_OUT_CURRENT_SHIFT);
+#endif
 
 	return 0;
 }
@@ -1378,7 +1381,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
 
 	snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL,
 			SGTL5000_HP_ZCD_EN |
-			SGTL5000_ADC_ZCD_EN);
+			SGTL5000_ADC_ZCD_EN 
+			| SGTL5000_LINE_OUT_MUTE);
 
 	snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0);
 
-- 
1.7.0.4

WARNING: multiple messages have this Message-ID (diff)
From: B29396@freescale.com (Dong Aisheng-B29396)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ASoC: mxs-saif: add record function
Date: Wed, 24 Aug 2011 11:08:15 +0000	[thread overview]
Message-ID: <65EE16ACC360FA4D99C96DC085B3F772223F4A@039-SN1MPN1-001.039d.mgd.msft.net> (raw)
In-Reply-To: <20110822113054.GC2006@pengutronix.de>

Hi Wolfram,

> -----Original Message-----
> From: Wolfram Sang [mailto:w.sang at pengutronix.de]
> Sent: Monday, August 22, 2011 7:31 PM
> To: Dong Aisheng-B29396
> Cc: alsa-devel at alsa-project.org; linux-arm-kernel at lists.infradead.org;
> broonie at opensource.wolfsonmicro.com; lrg at ti.com; s.hauer at pengutronix.de
> Subject: Re: [PATCH 1/2] ASoC: mxs-saif: add record function
> 
> On Mon, Aug 22, 2011 at 12:02:25AM +0800, Dong Aisheng wrote:
> > 1. add different clkmux mode handling for record.
> > SAIF can use two instances to implement full duplex (playback &
> > recording) and record saif may work on EXTMASTER mode that is using
> > other saif's BITCLK&LRCLK.
> > The clkmux mode is determined by saif's platform data and machine
> > specific clkmux setting is done in pdata->init().
> > 2. support playback and capture simutaneously however the sample rates
> > can not be different due to hw limitation.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > Cc: Liam Girdwood <lrg@ti.com>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Wolfram Sang <w.sang@pengutronix.de>
> 
> Will test and review, but probably not before Wednesday.
> 

If you want to test, you may need to apply another sgtl5000 patch
to fix noise issue.

BTW, since MX28EVK only has line-in (no mic-in), i just tested by
capturing data from line-in and connected the line-in to a PC's
Headphone output.

Not sure if there might be some issue due to line-in level is a
little different from headphone out level.
(Any comments from the person who knows?)

Anyway, it just sounds well at my side.

The patch for your reference:
It's just for testing and I'm going to check it with our ic people
for the root cause.

Regards
Dong Aisheng

  reply	other threads:[~2011-08-24 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 16:02 [PATCH 1/2] ASoC: mxs-saif: add record function Dong Aisheng
2011-08-21 16:02 ` Dong Aisheng
2011-08-22 10:37 ` Liam Girdwood
2011-08-22 10:37   ` Liam Girdwood
2011-08-22 11:09   ` Dong Aisheng-B29396
2011-08-22 11:09     ` Dong Aisheng-B29396
2011-08-22 11:30 ` Wolfram Sang
2011-08-22 11:30   ` Wolfram Sang
2011-08-24 11:08   ` Dong Aisheng-B29396 [this message]
2011-08-24 11:08     ` Dong Aisheng-B29396

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65EE16ACC360FA4D99C96DC085B3F772223F4A@039-SN1MPN1-001.039d.mgd.msft.net \
    --to=b29396@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lrg@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.