From: lamikr <lamikr@cc.jyu.fi>
To: OMAP-Linux <linux-omap-open-source@linux.omap.com>
Subject: [PATCH 2/3] aic23: omap-alsa-aic23.c clockrate config fix.
Date: Thu, 25 May 2006 23:53:20 +0300 [thread overview]
Message-ID: <44761940.8020907@cc.jyu.fi> (raw)
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
Do not try to change the clockrate if it is already ok. This fixes the
driver for omap-innovator which uses fixed clockrate.
Signed-off-by: Mika Laitio <lamikr@cc.jyu.fi>
[-- Attachment #2: 0002-omap-alsa-aic23.c-clockrate-config-fix.txt --]
[-- Type: text/plain, Size: 1498 bytes --]
>From nobody Mon Sep 17 00:00:00 2001
From: Mika Laitio <lamikr@cc.jyu.fi>
Date: Thu May 25 23:24:16 2006 +0300
Subject: [PATCH 2/3] aic23: omap-alsa-aic23.c clockrate config fix.
Signed-off-by: Mika Laitio <lamikr@cc.jyu.fi>
---
sound/arm/omap/omap-alsa-aic23.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
48b9327b4d5932cf2f18c8e529e3401b2e926b84
diff --git a/sound/arm/omap/omap-alsa-aic23.c b/sound/arm/omap/omap-alsa-aic23.c
index 18b7395..293c2d4 100644
--- a/sound/arm/omap/omap-alsa-aic23.c
+++ b/sound/arm/omap/omap-alsa-aic23.c
@@ -212,6 +212,8 @@ void aic23_clock_setup(void)
*/
int aic23_clock_on(void)
{
+ uint curRate;
+
if (clk_get_usecount(aic23_mclk) > 0) {
/* MCLK is already in use */
printk(KERN_WARNING
@@ -219,13 +221,14 @@ int aic23_clock_on(void)
(uint) clk_get_rate(aic23_mclk),
CODEC_CLOCK);
}
-
- if (clk_set_rate(aic23_mclk, CODEC_CLOCK)) {
- printk(KERN_ERR
- "Cannot set MCLK for AIC23 CODEC\n");
- return -ECANCELED;
+ curRate = (uint)clk_get_rate(aic23_mclk);
+ if (curRate != CODEC_CLOCK) {
+ if (clk_set_rate(aic23_mclk, CODEC_CLOCK)) {
+ printk(KERN_ERR
+ "Cannot set MCLK for AIC23 CODEC\n");
+ return -ECANCELED;
+ }
}
-
clk_enable(aic23_mclk);
printk(KERN_DEBUG
@@ -239,6 +242,7 @@ int aic23_clock_on(void)
~ADC_OFF & ~MIC_OFF & ~LINE_OFF);
return 0;
}
+
/*
* Do some sanity check, turn clock off and then turn
* codec audio off
--
1.2.2
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
reply other threads:[~2006-05-25 20:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=44761940.8020907@cc.jyu.fi \
--to=lamikr@cc.jyu.fi \
--cc=linux-omap-open-source@linux.omap.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox