public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk
@ 2011-05-27 15:30 Axel Lin
  2011-05-27 21:13 ` Liam Girdwood
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2011-05-27 15:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Hsiang, Peter Hsiang, Liam Girdwood, Mark Brown, alsa-devel

Current implementation set max98095->sysclk/max98088->sysclk to freq twice.
Set it once is enough, this patch removes the first assignment in case
we may set invalid clock frequency to max98095->sysclk/max98088->sysclk.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
hi Peter,
I don't have this hardware handy. Can you help to test it?
Thanks,
Axel

 sound/soc/codecs/max98088.c |    2 --
 sound/soc/codecs/max98095.c |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 4173b67..ac65a2d 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1397,8 +1397,6 @@ static int max98088_dai_set_sysclk(struct snd_soc_dai *dai,
        if (freq == max98088->sysclk)
                return 0;
 
-       max98088->sysclk = freq; /* remember current sysclk */
-
        /* Setup clocks for slave mode, and using the PLL
         * PSCLK = 0x01 (when master clk is 10MHz to 20MHz)
         *         0x02 (when master clk is 20MHz to 30MHz)..
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index e1d282d..872a5fa 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1517,8 +1517,6 @@ static int max98095_dai_set_sysclk(struct snd_soc_dai *dai,
 	if (freq == max98095->sysclk)
 		return 0;
 
-	max98095->sysclk = freq; /* remember current sysclk */
-
 	/* Setup clocks for slave mode, and using the PLL
 	 * PSCLK = 0x01 (when master clk is 10MHz to 20MHz)
 	 *         0x02 (when master clk is 20MHz to 40MHz)..
-- 
1.7.1




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

end of thread, other threads:[~2011-05-28 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 15:30 [PATCH] ASoC: Remove redundant freq assignment for max98095->sysclk/max98088->sysclk Axel Lin
2011-05-27 21:13 ` Liam Girdwood
2011-05-28  1:45 ` Peter Hsiang
2011-05-28 17:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox