.. | .. |
---|
1424 | 1424 | struct snd_pcm_hw_params *params, |
---|
1425 | 1425 | struct snd_soc_dai *dai) |
---|
1426 | 1426 | { |
---|
1427 | | - struct snd_soc_pcm_runtime *rtd = substream->private_data; |
---|
1428 | | - struct snd_soc_component *component = rtd->codec_dai->component; |
---|
| 1427 | + struct snd_soc_component *component = dai->component; |
---|
1429 | 1428 | struct rk312x_codec_priv *rk312x = rk312x_priv; |
---|
1430 | 1429 | unsigned int rate = params_rate(params); |
---|
1431 | 1430 | unsigned int div; |
---|
.. | .. |
---|
1534 | 1533 | rk312x_codec_ctl_gpio(CODEC_SET_SPK, 1); |
---|
1535 | 1534 | } |
---|
1536 | 1535 | |
---|
1537 | | -static int rk312x_digital_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1536 | +static int rk312x_digital_mute(struct snd_soc_dai *dai, int mute, int stream) |
---|
1538 | 1537 | { |
---|
1539 | 1538 | |
---|
1540 | 1539 | if (mute) { |
---|
.. | .. |
---|
1922 | 1921 | .hw_params = rk312x_hw_params, |
---|
1923 | 1922 | .set_fmt = rk312x_set_dai_fmt, |
---|
1924 | 1923 | .set_sysclk = rk312x_set_dai_sysclk, |
---|
1925 | | - .digital_mute = rk312x_digital_mute, |
---|
| 1924 | + .mute_stream = rk312x_digital_mute, |
---|
1926 | 1925 | .startup = rk312x_startup, |
---|
1927 | 1926 | .shutdown = rk312x_shutdown, |
---|
| 1927 | + .no_capture_mute = 1, |
---|
1928 | 1928 | }; |
---|
1929 | 1929 | |
---|
1930 | 1930 | static struct snd_soc_dai_driver rk312x_dai[] = { |
---|
.. | .. |
---|
2067 | 2067 | if (rk312x_priv->codec_hp_det) { |
---|
2068 | 2068 | /* enable hp det interrupt */ |
---|
2069 | 2069 | snd_soc_component_write(component, RK312x_DAC_CTL, 0x08); |
---|
2070 | | - snd_soc_component_read(component, RK312x_DAC_CTL, &val); |
---|
| 2070 | + val = snd_soc_component_read(component, RK312x_DAC_CTL); |
---|
2071 | 2071 | printk("0xa0 -- 0x%x\n", val); |
---|
2072 | 2072 | regmap_read(rk312x_priv->grf, GRF_ACODEC_CON, &val); |
---|
2073 | 2073 | regmap_write(rk312x_priv->grf, GRF_ACODEC_CON, 0x1f001f); |
---|
.. | .. |
---|
2156 | 2156 | DBG("GRF_ACODEC_CON 3334is 0x%x\n", val); |
---|
2157 | 2157 | /* enable rk 3128 codec_hp_det */ |
---|
2158 | 2158 | snd_soc_component_write(component, RK312x_DAC_CTL, 0x08); |
---|
2159 | | - snd_soc_component_read(component, RK312x_DAC_CTL, &val); |
---|
| 2159 | + val = snd_soc_component_read(component, RK312x_DAC_CTL); |
---|
2160 | 2160 | DBG("0xa0 -- 0x%x\n", val); |
---|
2161 | 2161 | /* codec hp det once */ |
---|
2162 | 2162 | schedule_delayed_work(&rk312x_priv->hpdet_work, msecs_to_jiffies(100)); |
---|
.. | .. |
---|
2187 | 2187 | goto err__; |
---|
2188 | 2188 | } |
---|
2189 | 2189 | |
---|
2190 | | - snd_soc_component_read(component, RK312x_RESET, &val); |
---|
| 2190 | + val = snd_soc_component_read(component, RK312x_RESET); |
---|
2191 | 2191 | |
---|
2192 | 2192 | if (val != rk312x_reg_defaults[RK312x_RESET]) { |
---|
2193 | 2193 | DBG("%s : codec register 0: %x is not a 0x00000003\n", |
---|