.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * wm8985.c -- WM8985 / WM8758 ALSA SoC Audio driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * WM8758 support: |
---|
8 | 9 | * Copyright: 2016 Barix AG |
---|
9 | 10 | * Author: Petr Kulhavy <petr@barix.com> |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License version 2 as |
---|
13 | | - * published by the Free Software Foundation. |
---|
14 | 11 | * |
---|
15 | 12 | * TODO: |
---|
16 | 13 | * o Add OUT3/OUT4 mixer controls. |
---|
.. | .. |
---|
595 | 592 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
---|
596 | 593 | unsigned int reg; |
---|
597 | 594 | |
---|
598 | | - reg = snd_soc_component_read32(component, WM8985_EQ1_LOW_SHELF); |
---|
| 595 | + reg = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); |
---|
599 | 596 | if (reg & WM8985_EQ3DMODE) |
---|
600 | 597 | ucontrol->value.enumerated.item[0] = 1; |
---|
601 | 598 | else |
---|
.. | .. |
---|
615 | 612 | && ucontrol->value.enumerated.item[0] != 1) |
---|
616 | 613 | return -EINVAL; |
---|
617 | 614 | |
---|
618 | | - reg_eq = snd_soc_component_read32(component, WM8985_EQ1_LOW_SHELF); |
---|
| 615 | + reg_eq = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); |
---|
619 | 616 | switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) { |
---|
620 | 617 | case 0: |
---|
621 | 618 | if (!ucontrol->value.enumerated.item[0]) |
---|
.. | .. |
---|
627 | 624 | break; |
---|
628 | 625 | } |
---|
629 | 626 | |
---|
630 | | - regpwr2 = snd_soc_component_read32(component, WM8985_POWER_MANAGEMENT_2); |
---|
631 | | - regpwr3 = snd_soc_component_read32(component, WM8985_POWER_MANAGEMENT_3); |
---|
| 627 | + regpwr2 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_2); |
---|
| 628 | + regpwr3 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_3); |
---|
632 | 629 | /* disable the DACs and ADCs */ |
---|
633 | 630 | snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_2, |
---|
634 | 631 | WM8985_ADCENR_MASK | WM8985_ADCENL_MASK, 0); |
---|
.. | .. |
---|
652 | 649 | return snd_soc_component_write(component, WM8985_SOFTWARE_RESET, 0x0); |
---|
653 | 650 | } |
---|
654 | 651 | |
---|
655 | | -static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute) |
---|
| 652 | +static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
656 | 653 | { |
---|
657 | 654 | struct snd_soc_component *component = dai->component; |
---|
658 | 655 | |
---|
.. | .. |
---|
1075 | 1072 | } |
---|
1076 | 1073 | |
---|
1077 | 1074 | static const struct snd_soc_dai_ops wm8985_dai_ops = { |
---|
1078 | | - .digital_mute = wm8985_dac_mute, |
---|
| 1075 | + .mute_stream = wm8985_dac_mute, |
---|
1079 | 1076 | .hw_params = wm8985_hw_params, |
---|
1080 | 1077 | .set_fmt = wm8985_set_fmt, |
---|
1081 | 1078 | .set_sysclk = wm8985_set_sysclk, |
---|
1082 | | - .set_pll = wm8985_set_pll |
---|
| 1079 | + .set_pll = wm8985_set_pll, |
---|
| 1080 | + .no_capture_mute = 1, |
---|
1083 | 1081 | }; |
---|
1084 | 1082 | |
---|
1085 | 1083 | #define WM8985_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ |
---|