jz4740.c (7483d45f0aee3afc0646d185cabd4af9f6cab58c) | jz4740.c (e6968a1719a88afa4708ff43696d6615f0be90be) |
---|---|
1/* 2 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * You should have received a copy of the GNU General Public License along --- 150 unchanged lines hidden (view full) --- 159 {"LOUT", NULL, "Output Mixer"}, 160 {"ROUT", NULL, "Output Mixer"}, 161}; 162 163static int jz4740_codec_hw_params(struct snd_pcm_substream *substream, 164 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) 165{ 166 uint32_t val; | 1/* 2 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * You should have received a copy of the GNU General Public License along --- 150 unchanged lines hidden (view full) --- 159 {"LOUT", NULL, "Output Mixer"}, 160 {"ROUT", NULL, "Output Mixer"}, 161}; 162 163static int jz4740_codec_hw_params(struct snd_pcm_substream *substream, 164 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) 165{ 166 uint32_t val; |
167 struct snd_soc_pcm_runtime *rtd = substream->private_data; 168 struct snd_soc_codec *codec =rtd->codec; | 167 struct snd_soc_codec *codec = dai->codec; |
169 170 switch (params_rate(params)) { 171 case 8000: 172 val = 0; 173 break; 174 case 11025: 175 val = 1; 176 break; --- 255 unchanged lines hidden --- | 168 169 switch (params_rate(params)) { 170 case 8000: 171 val = 0; 172 break; 173 case 11025: 174 val = 1; 175 break; --- 255 unchanged lines hidden --- |