pcm1681.c (5e2aa2ed08e2e280121dc7cf5609c87d464f12ef) | pcm1681.c (d7f58db49d9ad92bdb12d21fdc2308b76bc2ed38) |
---|---|
1/* 2 * PCM1681 ASoC codec driver 3 * 4 * Copyright (c) StreamUnlimited GmbH 2013 5 * Marek Belisko <marek.belisko@streamunlimited.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 104 unchanged lines hidden (view full) --- 113} 114 115static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol, 116 struct snd_ctl_elem_value *ucontrol) 117{ 118 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 119 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 120 | 1/* 2 * PCM1681 ASoC codec driver 3 * 4 * Copyright (c) StreamUnlimited GmbH 2013 5 * Marek Belisko <marek.belisko@streamunlimited.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 104 unchanged lines hidden (view full) --- 113} 114 115static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol, 116 struct snd_ctl_elem_value *ucontrol) 117{ 118 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 119 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 120 |
121 ucontrol->value.enumerated.item[0] = priv->deemph; | 121 ucontrol->value.integer.value[0] = priv->deemph; |
122 123 return 0; 124} 125 126static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol, 127 struct snd_ctl_elem_value *ucontrol) 128{ 129 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 130 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 131 | 122 123 return 0; 124} 125 126static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol, 127 struct snd_ctl_elem_value *ucontrol) 128{ 129 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 130 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 131 |
132 priv->deemph = ucontrol->value.enumerated.item[0]; | 132 priv->deemph = ucontrol->value.integer.value[0]; |
133 134 return pcm1681_set_deemph(codec); 135} 136 137static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai, 138 unsigned int format) 139{ 140 struct snd_soc_codec *codec = codec_dai->codec; --- 205 unchanged lines hidden --- | 133 134 return pcm1681_set_deemph(codec); 135} 136 137static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai, 138 unsigned int format) 139{ 140 struct snd_soc_codec *codec = codec_dai->codec; --- 205 unchanged lines hidden --- |