.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * wm8983.c -- WM8983 ALSA SoC Audio driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2011 Wolfson Microelectronics plc |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/module.h> |
---|
.. | .. |
---|
495 | 492 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
---|
496 | 493 | unsigned int reg; |
---|
497 | 494 | |
---|
498 | | - reg = snd_soc_component_read32(component, WM8983_EQ1_LOW_SHELF); |
---|
| 495 | + reg = snd_soc_component_read(component, WM8983_EQ1_LOW_SHELF); |
---|
499 | 496 | if (reg & WM8983_EQ3DMODE) |
---|
500 | 497 | ucontrol->value.enumerated.item[0] = 1; |
---|
501 | 498 | else |
---|
.. | .. |
---|
515 | 512 | && ucontrol->value.enumerated.item[0] != 1) |
---|
516 | 513 | return -EINVAL; |
---|
517 | 514 | |
---|
518 | | - reg_eq = snd_soc_component_read32(component, WM8983_EQ1_LOW_SHELF); |
---|
| 515 | + reg_eq = snd_soc_component_read(component, WM8983_EQ1_LOW_SHELF); |
---|
519 | 516 | switch ((reg_eq & WM8983_EQ3DMODE) >> WM8983_EQ3DMODE_SHIFT) { |
---|
520 | 517 | case 0: |
---|
521 | 518 | if (!ucontrol->value.enumerated.item[0]) |
---|
.. | .. |
---|
527 | 524 | break; |
---|
528 | 525 | } |
---|
529 | 526 | |
---|
530 | | - regpwr2 = snd_soc_component_read32(component, WM8983_POWER_MANAGEMENT_2); |
---|
531 | | - regpwr3 = snd_soc_component_read32(component, WM8983_POWER_MANAGEMENT_3); |
---|
| 527 | + regpwr2 = snd_soc_component_read(component, WM8983_POWER_MANAGEMENT_2); |
---|
| 528 | + regpwr3 = snd_soc_component_read(component, WM8983_POWER_MANAGEMENT_3); |
---|
532 | 529 | /* disable the DACs and ADCs */ |
---|
533 | 530 | snd_soc_component_update_bits(component, WM8983_POWER_MANAGEMENT_2, |
---|
534 | 531 | WM8983_ADCENR_MASK | WM8983_ADCENL_MASK, 0); |
---|
.. | .. |
---|
560 | 557 | } |
---|
561 | 558 | } |
---|
562 | 559 | |
---|
563 | | -static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute) |
---|
| 560 | +static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
564 | 561 | { |
---|
565 | 562 | struct snd_soc_component *component = dai->component; |
---|
566 | 563 | |
---|
.. | .. |
---|
946 | 943 | } |
---|
947 | 944 | |
---|
948 | 945 | static const struct snd_soc_dai_ops wm8983_dai_ops = { |
---|
949 | | - .digital_mute = wm8983_dac_mute, |
---|
| 946 | + .mute_stream = wm8983_dac_mute, |
---|
950 | 947 | .hw_params = wm8983_hw_params, |
---|
951 | 948 | .set_fmt = wm8983_set_fmt, |
---|
952 | 949 | .set_sysclk = wm8983_set_sysclk, |
---|
953 | | - .set_pll = wm8983_set_pll |
---|
| 950 | + .set_pll = wm8983_set_pll, |
---|
| 951 | + .no_capture_mute = 1, |
---|
954 | 952 | }; |
---|
955 | 953 | |
---|
956 | 954 | #define WM8983_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ |
---|