| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * wm8750.c -- WM8750 ALSA SoC audio driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Author: Richard Purdie <richard@openedhand.com> |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Based on WM8753.c |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 12 | | - * published by the Free Software Foundation. |
|---|
| 13 | 10 | */ |
|---|
| 14 | 11 | |
|---|
| 15 | 12 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 581 | 578 | { |
|---|
| 582 | 579 | struct snd_soc_component *component = dai->component; |
|---|
| 583 | 580 | struct wm8750_priv *wm8750 = snd_soc_component_get_drvdata(component); |
|---|
| 584 | | - u16 iface = snd_soc_component_read32(component, WM8750_IFACE) & 0x1f3; |
|---|
| 585 | | - u16 srate = snd_soc_component_read32(component, WM8750_SRATE) & 0x1c0; |
|---|
| 581 | + u16 iface = snd_soc_component_read(component, WM8750_IFACE) & 0x1f3; |
|---|
| 582 | + u16 srate = snd_soc_component_read(component, WM8750_SRATE) & 0x1c0; |
|---|
| 586 | 583 | int coeff = get_coeff(wm8750->sysclk, params_rate(params)); |
|---|
| 587 | 584 | |
|---|
| 588 | 585 | /* bit size */ |
|---|
| .. | .. |
|---|
| 609 | 606 | return 0; |
|---|
| 610 | 607 | } |
|---|
| 611 | 608 | |
|---|
| 612 | | -static int wm8750_mute(struct snd_soc_dai *dai, int mute) |
|---|
| 609 | +static int wm8750_mute(struct snd_soc_dai *dai, int mute, int direction) |
|---|
| 613 | 610 | { |
|---|
| 614 | 611 | struct snd_soc_component *component = dai->component; |
|---|
| 615 | | - u16 mute_reg = snd_soc_component_read32(component, WM8750_ADCDAC) & 0xfff7; |
|---|
| 612 | + u16 mute_reg = snd_soc_component_read(component, WM8750_ADCDAC) & 0xfff7; |
|---|
| 616 | 613 | |
|---|
| 617 | 614 | if (mute) |
|---|
| 618 | 615 | snd_soc_component_write(component, WM8750_ADCDAC, mute_reg | 0x8); |
|---|
| .. | .. |
|---|
| 624 | 621 | static int wm8750_set_bias_level(struct snd_soc_component *component, |
|---|
| 625 | 622 | enum snd_soc_bias_level level) |
|---|
| 626 | 623 | { |
|---|
| 627 | | - u16 pwr_reg = snd_soc_component_read32(component, WM8750_PWR1) & 0xfe3e; |
|---|
| 624 | + u16 pwr_reg = snd_soc_component_read(component, WM8750_PWR1) & 0xfe3e; |
|---|
| 628 | 625 | |
|---|
| 629 | 626 | switch (level) { |
|---|
| 630 | 627 | case SND_SOC_BIAS_ON: |
|---|
| .. | .. |
|---|
| 663 | 660 | |
|---|
| 664 | 661 | static const struct snd_soc_dai_ops wm8750_dai_ops = { |
|---|
| 665 | 662 | .hw_params = wm8750_pcm_hw_params, |
|---|
| 666 | | - .digital_mute = wm8750_mute, |
|---|
| 663 | + .mute_stream = wm8750_mute, |
|---|
| 667 | 664 | .set_fmt = wm8750_set_dai_fmt, |
|---|
| 668 | 665 | .set_sysclk = wm8750_set_dai_sysclk, |
|---|
| 666 | + .no_capture_mute = 1, |
|---|
| 669 | 667 | }; |
|---|
| 670 | 668 | |
|---|
| 671 | 669 | static struct snd_soc_dai_driver wm8750_dai = { |
|---|