lm49453.c (dbf7a733f5fb9da9de750716ec7c7615c30cbfb8) lm49453.c (e6968a1719a88afa4708ff43696d6615f0be90be)
1/*
2 * lm49453.c - LM49453 ALSA Soc Audio driver
3 *
4 * Copyright (c) 2012 Texas Instruments, Inc
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.

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

1135
1136 { "Sidetone", "Sidetone Switch", "Sidetone Mixer" },
1137};
1138
1139static int lm49453_hw_params(struct snd_pcm_substream *substream,
1140 struct snd_pcm_hw_params *params,
1141 struct snd_soc_dai *dai)
1142{
1/*
2 * lm49453.c - LM49453 ALSA Soc Audio driver
3 *
4 * Copyright (c) 2012 Texas Instruments, Inc
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.

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

1135
1136 { "Sidetone", "Sidetone Switch", "Sidetone Mixer" },
1137};
1138
1139static int lm49453_hw_params(struct snd_pcm_substream *substream,
1140 struct snd_pcm_hw_params *params,
1141 struct snd_soc_dai *dai)
1142{
1143 struct snd_soc_pcm_runtime *rtd = substream->private_data;
1144 struct snd_soc_codec *codec = rtd->codec;
1143 struct snd_soc_codec *codec = dai->codec;
1145 struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
1146 u16 clk_div = 0;
1147
1148 lm49453->fs_rate = params_rate(params);
1149
1150 /* Setting DAC clock dividers based on substream sample rate. */
1151 switch (lm49453->fs_rate) {
1152 case 8000:

--- 402 unchanged lines hidden ---
1144 struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
1145 u16 clk_div = 0;
1146
1147 lm49453->fs_rate = params_rate(params);
1148
1149 /* Setting DAC clock dividers based on substream sample rate. */
1150 switch (lm49453->fs_rate) {
1151 case 8000:

--- 402 unchanged lines hidden ---