ak4535.c (959d851caa48829eb85cb85aa949fd6b4c5d5bc6) | ak4535.c (e6968a1719a88afa4708ff43696d6615f0be90be) |
---|---|
1/* 2 * ak4535.c -- AK4535 ALSA Soc Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * 6 * Author: Richard Purdie <richard@openedhand.com> 7 * 8 * Based on wm8753.c by Liam Girdwood --- 248 unchanged lines hidden (view full) --- 257 ak4535->sysclk = freq; 258 return 0; 259} 260 261static int ak4535_hw_params(struct snd_pcm_substream *substream, 262 struct snd_pcm_hw_params *params, 263 struct snd_soc_dai *dai) 264{ | 1/* 2 * ak4535.c -- AK4535 ALSA Soc Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * 6 * Author: Richard Purdie <richard@openedhand.com> 7 * 8 * Based on wm8753.c by Liam Girdwood --- 248 unchanged lines hidden (view full) --- 257 ak4535->sysclk = freq; 258 return 0; 259} 260 261static int ak4535_hw_params(struct snd_pcm_substream *substream, 262 struct snd_pcm_hw_params *params, 263 struct snd_soc_dai *dai) 264{ |
265 struct snd_soc_pcm_runtime *rtd = substream->private_data; 266 struct snd_soc_codec *codec = rtd->codec; | 265 struct snd_soc_codec *codec = dai->codec; |
267 struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec); 268 u8 mode2 = snd_soc_read(codec, AK4535_MODE2) & ~(0x3 << 5); 269 int rate = params_rate(params), fs = 256; 270 271 if (rate) 272 fs = ak4535->sysclk / rate; 273 274 /* set fs */ --- 223 unchanged lines hidden --- | 266 struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec); 267 u8 mode2 = snd_soc_read(codec, AK4535_MODE2) & ~(0x3 << 5); 268 int rate = params_rate(params), fs = 256; 269 270 if (rate) 271 fs = ak4535->sysclk / rate; 272 273 /* set fs */ --- 223 unchanged lines hidden --- |