diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 8d20f6ec20f3..64d2a4fa34b2 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -802,8 +802,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream, | |||
802 | struct snd_pcm_hw_params *params, | 802 | struct snd_pcm_hw_params *params, |
803 | struct snd_soc_dai *dai) | 803 | struct snd_soc_dai *dai) |
804 | { | 804 | { |
805 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 805 | struct snd_soc_codec *codec = dai->codec; |
806 | struct snd_soc_codec *codec =rtd->codec; | ||
807 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); | 806 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); |
808 | int codec_clk = 0, bypass_pll = 0, fsref, last_clk = 0; | 807 | int codec_clk = 0, bypass_pll = 0, fsref, last_clk = 0; |
809 | u8 data, j, r, p, pll_q, pll_p = 1, pll_r = 1, pll_j = 1; | 808 | u8 data, j, r, p, pll_q, pll_p = 1, pll_r = 1, pll_j = 1; |
@@ -1161,24 +1160,6 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec, | |||
1161 | return 0; | 1160 | return 0; |
1162 | } | 1161 | } |
1163 | 1162 | ||
1164 | void aic3x_set_headset_detection(struct snd_soc_codec *codec, int detect, | ||
1165 | int headset_debounce, int button_debounce) | ||
1166 | { | ||
1167 | u8 val; | ||
1168 | |||
1169 | val = ((detect & AIC3X_HEADSET_DETECT_MASK) | ||
1170 | << AIC3X_HEADSET_DETECT_SHIFT) | | ||
1171 | ((headset_debounce & AIC3X_HEADSET_DEBOUNCE_MASK) | ||
1172 | << AIC3X_HEADSET_DEBOUNCE_SHIFT) | | ||
1173 | ((button_debounce & AIC3X_BUTTON_DEBOUNCE_MASK) | ||
1174 | << AIC3X_BUTTON_DEBOUNCE_SHIFT); | ||
1175 | |||
1176 | if (detect & AIC3X_HEADSET_DETECT_MASK) | ||
1177 | val |= AIC3X_HEADSET_DETECT_ENABLED; | ||
1178 | |||
1179 | snd_soc_write(codec, AIC3X_HEADSET_DETECT_CTRL_A, val); | ||
1180 | } | ||
1181 | |||
1182 | #define AIC3X_RATES SNDRV_PCM_RATE_8000_96000 | 1163 | #define AIC3X_RATES SNDRV_PCM_RATE_8000_96000 |
1183 | #define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ | 1164 | #define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ |
1184 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) | 1165 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) |