wm8523.c (7483d45f0aee3afc0646d185cabd4af9f6cab58c) wm8523.c (e6968a1719a88afa4708ff43696d6615f0be90be)
1/*
2 * wm8523.c -- WM8523 ALSA SoC Audio driver
3 *
4 * Copyright 2009 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 *

--- 131 unchanged lines hidden (view full) ---

140
141 return 0;
142}
143
144static int wm8523_hw_params(struct snd_pcm_substream *substream,
145 struct snd_pcm_hw_params *params,
146 struct snd_soc_dai *dai)
147{
1/*
2 * wm8523.c -- WM8523 ALSA SoC Audio driver
3 *
4 * Copyright 2009 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 *

--- 131 unchanged lines hidden (view full) ---

140
141 return 0;
142}
143
144static int wm8523_hw_params(struct snd_pcm_substream *substream,
145 struct snd_pcm_hw_params *params,
146 struct snd_soc_dai *dai)
147{
148 struct snd_soc_pcm_runtime *rtd = substream->private_data;
149 struct snd_soc_codec *codec = rtd->codec;
148 struct snd_soc_codec *codec = dai->codec;
150 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
151 int i;
152 u16 aifctrl1 = snd_soc_read(codec, WM8523_AIF_CTRL1);
153 u16 aifctrl2 = snd_soc_read(codec, WM8523_AIF_CTRL2);
154
155 /* Find a supported LRCLK ratio */
156 for (i = 0; i < ARRAY_SIZE(lrclk_ratios); i++) {
157 if (wm8523->sysclk / params_rate(params) ==

--- 427 unchanged lines hidden ---
149 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
150 int i;
151 u16 aifctrl1 = snd_soc_read(codec, WM8523_AIF_CTRL1);
152 u16 aifctrl2 = snd_soc_read(codec, WM8523_AIF_CTRL2);
153
154 /* Find a supported LRCLK ratio */
155 for (i = 0; i < ARRAY_SIZE(lrclk_ratios); i++) {
156 if (wm8523->sysclk / params_rate(params) ==

--- 427 unchanged lines hidden ---