.. | .. |
---|
422 | 422 | } |
---|
423 | 423 | |
---|
424 | 424 | snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
425 | | - ADC_DIG_CLK_MASK, DAC_DIG_CLK_DIS); |
---|
| 425 | + ADC_DIG_CLK_MASK, ADC_DIG_CLK_DIS); |
---|
426 | 426 | usleep_range(2000, 2500); |
---|
427 | 427 | snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
428 | 428 | ADC_DIG_CLK_MASK, ADC_DIG_CLK_EN); |
---|
.. | .. |
---|
1034 | 1034 | return 0; |
---|
1035 | 1035 | } |
---|
1036 | 1036 | |
---|
1037 | | -static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream) |
---|
| 1037 | +static int rk817_digital_mute_dac(struct snd_soc_dai *dai, int mute, int stream) |
---|
1038 | 1038 | { |
---|
1039 | 1039 | struct snd_soc_component *component = dai->component; |
---|
1040 | 1040 | struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component); |
---|
.. | .. |
---|
1056 | 1056 | DAC_DIG_CLK_EN, DAC_DIG_CLK_DIS); |
---|
1057 | 1057 | snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
1058 | 1058 | DAC_DIG_CLK_EN, DAC_DIG_CLK_EN); |
---|
| 1059 | + snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
| 1060 | + I2SRX_EN_MASK, I2SRX_DIS); |
---|
1059 | 1061 | } else { |
---|
| 1062 | + snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
| 1063 | + I2SRX_EN_MASK, I2SRX_EN); |
---|
1060 | 1064 | snd_soc_component_update_bits(component, |
---|
1061 | 1065 | RK817_CODEC_DDAC_MUTE_MIXCTL, |
---|
1062 | 1066 | DACMT_ENABLE, DACMT_DISABLE); |
---|
.. | .. |
---|
1106 | 1110 | return 0; |
---|
1107 | 1111 | } |
---|
1108 | 1112 | |
---|
| 1113 | +static int rk817_digital_mute_adc(struct snd_soc_dai *dai, int mute, int stream) |
---|
| 1114 | +{ |
---|
| 1115 | + struct snd_soc_component *component = dai->component; |
---|
| 1116 | + |
---|
| 1117 | + if (mute) |
---|
| 1118 | + snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
| 1119 | + I2STX_EN_MASK, I2STX_DIS); |
---|
| 1120 | + else |
---|
| 1121 | + snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE, |
---|
| 1122 | + I2STX_EN_MASK, I2STX_EN); |
---|
| 1123 | + |
---|
| 1124 | + return 0; |
---|
| 1125 | +} |
---|
| 1126 | + |
---|
| 1127 | +static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream) |
---|
| 1128 | +{ |
---|
| 1129 | + if (stream == SNDRV_PCM_STREAM_PLAYBACK) |
---|
| 1130 | + return rk817_digital_mute_dac(dai, mute, stream); |
---|
| 1131 | + else |
---|
| 1132 | + return rk817_digital_mute_adc(dai, mute, stream); |
---|
| 1133 | +} |
---|
| 1134 | + |
---|
1109 | 1135 | #define RK817_PLAYBACK_RATES (SNDRV_PCM_RATE_8000 |\ |
---|
1110 | 1136 | SNDRV_PCM_RATE_16000 | \ |
---|
1111 | 1137 | SNDRV_PCM_RATE_32000 | \ |
---|
.. | .. |
---|
1150 | 1176 | .set_sysclk = rk817_set_dai_sysclk, |
---|
1151 | 1177 | .mute_stream = rk817_digital_mute, |
---|
1152 | 1178 | .shutdown = rk817_codec_shutdown, |
---|
1153 | | - .no_capture_mute = 1, |
---|
1154 | 1179 | }; |
---|
1155 | 1180 | |
---|
1156 | 1181 | static struct snd_soc_dai_driver rk817_dai[] = { |
---|