| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * wm8580.c -- WM8580 and WM8581 ALSA Soc Audio driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2008-12 Wolfson Microelectronics PLC. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 8 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 9 | | - * option) any later version. |
|---|
| 10 | 6 | * |
|---|
| 11 | 7 | * Notes: |
|---|
| 12 | 8 | * The WM8580 is a multichannel codec with S/PDIF support, featuring six |
|---|
| .. | .. |
|---|
| 515 | 511 | snd_soc_component_write(component, WM8580_PLLA3 + offset, |
|---|
| 516 | 512 | (pll_div.k >> 18 & 0xf) | (pll_div.n << 4)); |
|---|
| 517 | 513 | |
|---|
| 518 | | - reg = snd_soc_component_read32(component, WM8580_PLLA4 + offset); |
|---|
| 514 | + reg = snd_soc_component_read(component, WM8580_PLLA4 + offset); |
|---|
| 519 | 515 | reg &= ~0x1b; |
|---|
| 520 | 516 | reg |= pll_div.prescale | pll_div.postscale << 1 | |
|---|
| 521 | 517 | pll_div.freqmode << 3; |
|---|
| .. | .. |
|---|
| 612 | 608 | unsigned int aifb; |
|---|
| 613 | 609 | int can_invert_lrclk; |
|---|
| 614 | 610 | |
|---|
| 615 | | - aifa = snd_soc_component_read32(component, WM8580_PAIF1 + codec_dai->driver->id); |
|---|
| 616 | | - aifb = snd_soc_component_read32(component, WM8580_PAIF3 + codec_dai->driver->id); |
|---|
| 611 | + aifa = snd_soc_component_read(component, WM8580_PAIF1 + codec_dai->driver->id); |
|---|
| 612 | + aifb = snd_soc_component_read(component, WM8580_PAIF3 + codec_dai->driver->id); |
|---|
| 617 | 613 | |
|---|
| 618 | 614 | aifb &= ~(WM8580_AIF_FMT_MASK | WM8580_AIF_LRP | WM8580_AIF_BCP); |
|---|
| 619 | 615 | |
|---|
| .. | .. |
|---|
| 693 | 689 | |
|---|
| 694 | 690 | switch (div_id) { |
|---|
| 695 | 691 | case WM8580_MCLK: |
|---|
| 696 | | - reg = snd_soc_component_read32(component, WM8580_PLLB4); |
|---|
| 692 | + reg = snd_soc_component_read(component, WM8580_PLLB4); |
|---|
| 697 | 693 | reg &= ~WM8580_PLLB4_MCLKOUTSRC_MASK; |
|---|
| 698 | 694 | |
|---|
| 699 | 695 | switch (div) { |
|---|
| .. | .. |
|---|
| 719 | 715 | break; |
|---|
| 720 | 716 | |
|---|
| 721 | 717 | case WM8580_CLKOUTSRC: |
|---|
| 722 | | - reg = snd_soc_component_read32(component, WM8580_PLLB4); |
|---|
| 718 | + reg = snd_soc_component_read(component, WM8580_PLLB4); |
|---|
| 723 | 719 | reg &= ~WM8580_PLLB4_CLKOUTSRC_MASK; |
|---|
| 724 | 720 | |
|---|
| 725 | 721 | switch (div) { |
|---|
| .. | .. |
|---|
| 804 | 800 | return 0; |
|---|
| 805 | 801 | } |
|---|
| 806 | 802 | |
|---|
| 807 | | -static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute) |
|---|
| 803 | +static int wm8580_mute(struct snd_soc_dai *codec_dai, int mute, int direction) |
|---|
| 808 | 804 | { |
|---|
| 809 | 805 | struct snd_soc_component *component = codec_dai->component; |
|---|
| 810 | 806 | unsigned int reg; |
|---|
| 811 | 807 | |
|---|
| 812 | | - reg = snd_soc_component_read32(component, WM8580_DAC_CONTROL5); |
|---|
| 808 | + reg = snd_soc_component_read(component, WM8580_DAC_CONTROL5); |
|---|
| 813 | 809 | |
|---|
| 814 | 810 | if (mute) |
|---|
| 815 | 811 | reg |= WM8580_DAC_CONTROL5_MUTEALL; |
|---|
| .. | .. |
|---|
| 870 | 866 | .set_fmt = wm8580_set_paif_dai_fmt, |
|---|
| 871 | 867 | .set_clkdiv = wm8580_set_dai_clkdiv, |
|---|
| 872 | 868 | .set_pll = wm8580_set_dai_pll, |
|---|
| 873 | | - .digital_mute = wm8580_digital_mute, |
|---|
| 869 | + .mute_stream = wm8580_mute, |
|---|
| 870 | + .no_capture_mute = 1, |
|---|
| 874 | 871 | }; |
|---|
| 875 | 872 | |
|---|
| 876 | 873 | static const struct snd_soc_dai_ops wm8580_dai_ops_capture = { |
|---|