All of lore.kernel.org
 help / color / mirror / Atom feed
From: jassi.brar@samsung.com (Jassi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/10] S3C64XX I2S: Return correct codec clock
Date: Tue, 15 Sep 2009 19:02:40 +0900	[thread overview]
Message-ID: <1253008960-10666-1-git-send-email-jassi.brar@samsung.com> (raw)

When I2S controller is driven by PCLK, instead of SCLK_AUDIO, we
like to have iis_pclk.
Check the source clock selected and return appropriate clock pointer.

Signed-Off-by: Jassi <jassi.brar@samsung.com>
---
 sound/soc/s3c24xx/s3c64xx-i2s.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 62a7fce..66f4ded 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -133,8 +133,12 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
 struct clk *s3c64xx_i2s_get_clock(struct snd_soc_dai *dai)
 {
 	struct s3c_i2sv2_info *i2s = to_info(dai);
+	u32 iismod = readl(i2s->regs + S3C2412_IISMOD);
 
-	return i2s->iis_cclk;
+	if(iismod & S3C64XX_IISMOD_IMS_SYSMUX)
+		return i2s->iis_cclk;
+	else
+		return i2s->iis_pclk;
 }
 EXPORT_SYMBOL_GPL(s3c64xx_i2s_get_clock);
 
-- 
1.6.2.5

             reply	other threads:[~2009-09-15 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:02 Jassi [this message]
2009-09-15 11:06 ` [PATCH 08/10] S3C64XX I2S: Return correct codec clock Mark Brown
2009-09-15 11:21   ` jassi brar
2009-09-15 11:56     ` Mark Brown
2009-09-16  5:16       ` jassi brar
2009-09-16 11:09         ` Mark Brown
2009-09-16 11:50           ` jassi brar

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=1253008960-10666-1-git-send-email-jassi.brar@samsung.com \
    --to=jassi.brar@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.