.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * wm8955.c -- WM8955 ALSA SoC Audio driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2009 Wolfson Microelectronics plc |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Mark Brown <broonie@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> |
---|
.. | .. |
---|
143 | 140 | * to allow rounding later */ |
---|
144 | 141 | #define FIXED_FLL_SIZE ((1 << 22) * 10) |
---|
145 | 142 | |
---|
146 | | -static int wm8995_pll_factors(struct device *dev, |
---|
| 143 | +static int wm8955_pll_factors(struct device *dev, |
---|
147 | 144 | int Fref, int Fout, struct pll_factors *pll) |
---|
148 | 145 | { |
---|
149 | 146 | u64 Kpart; |
---|
.. | .. |
---|
282 | 279 | |
---|
283 | 280 | /* Use the last divider configuration we saw for the |
---|
284 | 281 | * sample rate. */ |
---|
285 | | - ret = wm8995_pll_factors(component->dev, wm8955->mclk_rate, |
---|
| 282 | + ret = wm8955_pll_factors(component->dev, wm8955->mclk_rate, |
---|
286 | 283 | clock_cfgs[sr].mclk, &pll); |
---|
287 | 284 | if (ret != 0) { |
---|
288 | 285 | dev_err(component->dev, |
---|
.. | .. |
---|
622 | 619 | /* If the chip is clocked then disable the clocks and force a |
---|
623 | 620 | * reconfiguration, otherwise DAPM will power up the |
---|
624 | 621 | * clocks for us later. */ |
---|
625 | | - ret = snd_soc_component_read32(component, WM8955_POWER_MANAGEMENT_1); |
---|
| 622 | + ret = snd_soc_component_read(component, WM8955_POWER_MANAGEMENT_1); |
---|
626 | 623 | if (ret < 0) |
---|
627 | 624 | return ret; |
---|
628 | 625 | if (ret & WM8955_DIGENB) { |
---|
.. | .. |
---|
686 | 683 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
---|
687 | 684 | case SND_SOC_DAIFMT_DSP_B: |
---|
688 | 685 | aif |= WM8955_LRP; |
---|
689 | | - /* fall through */ |
---|
| 686 | + fallthrough; |
---|
690 | 687 | case SND_SOC_DAIFMT_DSP_A: |
---|
691 | 688 | aif |= 0x3; |
---|
692 | 689 | break; |
---|
.. | .. |
---|
748 | 745 | } |
---|
749 | 746 | |
---|
750 | 747 | |
---|
751 | | -static int wm8955_digital_mute(struct snd_soc_dai *codec_dai, int mute) |
---|
| 748 | +static int wm8955_mute(struct snd_soc_dai *codec_dai, int mute, int direction) |
---|
752 | 749 | { |
---|
753 | 750 | struct snd_soc_component *component = codec_dai->component; |
---|
754 | 751 | int val; |
---|
.. | .. |
---|
851 | 848 | .set_sysclk = wm8955_set_sysclk, |
---|
852 | 849 | .set_fmt = wm8955_set_fmt, |
---|
853 | 850 | .hw_params = wm8955_hw_params, |
---|
854 | | - .digital_mute = wm8955_digital_mute, |
---|
| 851 | + .mute_stream = wm8955_mute, |
---|
| 852 | + .no_capture_mute = 1, |
---|
855 | 853 | }; |
---|
856 | 854 | |
---|
857 | 855 | static struct snd_soc_dai_driver wm8955_dai = { |
---|