ak4641.c (253322c18830965331e54ee33c5e8064a2f15717) | ak4641.c (e6968a1719a88afa4708ff43696d6615f0be90be) |
---|---|
1/* 2 * ak4641.c -- AK4641 ALSA Soc Audio driver 3 * 4 * Copyright (C) 2008 Harald Welte <laforge@gnufiish.org> 5 * Copyright (C) 2011 Dmitry Artamonow <mad_soft@inbox.ru> 6 * 7 * Based on ak4535.c by Richard Purdie 8 * --- 282 unchanged lines hidden (view full) --- 291 ak4641->sysclk = freq; 292 return 0; 293} 294 295static int ak4641_i2s_hw_params(struct snd_pcm_substream *substream, 296 struct snd_pcm_hw_params *params, 297 struct snd_soc_dai *dai) 298{ | 1/* 2 * ak4641.c -- AK4641 ALSA Soc Audio driver 3 * 4 * Copyright (C) 2008 Harald Welte <laforge@gnufiish.org> 5 * Copyright (C) 2011 Dmitry Artamonow <mad_soft@inbox.ru> 6 * 7 * Based on ak4535.c by Richard Purdie 8 * --- 282 unchanged lines hidden (view full) --- 291 ak4641->sysclk = freq; 292 return 0; 293} 294 295static int ak4641_i2s_hw_params(struct snd_pcm_substream *substream, 296 struct snd_pcm_hw_params *params, 297 struct snd_soc_dai *dai) 298{ |
299 struct snd_soc_pcm_runtime *rtd = substream->private_data; 300 struct snd_soc_codec *codec = rtd->codec; | 299 struct snd_soc_codec *codec = dai->codec; |
301 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); 302 int rate = params_rate(params), fs = 256; 303 u8 mode2; 304 305 if (rate) 306 fs = ak4641->sysclk / rate; 307 else 308 return -EINVAL; --- 344 unchanged lines hidden --- | 300 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); 301 int rate = params_rate(params), fs = 256; 302 u8 mode2; 303 304 if (rate) 305 fs = ak4641->sysclk / rate; 306 else 307 return -EINVAL; --- 344 unchanged lines hidden --- |