.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * ak4535.c -- AK4535 ALSA Soc Audio driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Author: Richard Purdie <richard@openedhand.com> |
---|
7 | 8 | * |
---|
8 | 9 | * Based on wm8753.c by Liam Girdwood |
---|
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> |
---|
.. | .. |
---|
264 | 261 | { |
---|
265 | 262 | struct snd_soc_component *component = dai->component; |
---|
266 | 263 | struct ak4535_priv *ak4535 = snd_soc_component_get_drvdata(component); |
---|
267 | | - u8 mode2 = snd_soc_component_read32(component, AK4535_MODE2) & ~(0x3 << 5); |
---|
| 264 | + u8 mode2 = snd_soc_component_read(component, AK4535_MODE2) & ~(0x3 << 5); |
---|
268 | 265 | int rate = params_rate(params), fs = 256; |
---|
269 | 266 | |
---|
270 | 267 | if (rate) |
---|
.. | .. |
---|
312 | 309 | return 0; |
---|
313 | 310 | } |
---|
314 | 311 | |
---|
315 | | -static int ak4535_mute(struct snd_soc_dai *dai, int mute) |
---|
| 312 | +static int ak4535_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
316 | 313 | { |
---|
317 | 314 | struct snd_soc_component *component = dai->component; |
---|
318 | | - u16 mute_reg = snd_soc_component_read32(component, AK4535_DAC); |
---|
| 315 | + u16 mute_reg = snd_soc_component_read(component, AK4535_DAC); |
---|
| 316 | + |
---|
319 | 317 | if (!mute) |
---|
320 | 318 | snd_soc_component_write(component, AK4535_DAC, mute_reg & ~0x20); |
---|
321 | 319 | else |
---|
.. | .. |
---|
351 | 349 | static const struct snd_soc_dai_ops ak4535_dai_ops = { |
---|
352 | 350 | .hw_params = ak4535_hw_params, |
---|
353 | 351 | .set_fmt = ak4535_set_dai_fmt, |
---|
354 | | - .digital_mute = ak4535_mute, |
---|
| 352 | + .mute_stream = ak4535_mute, |
---|
355 | 353 | .set_sysclk = ak4535_set_dai_sysclk, |
---|
| 354 | + .no_capture_mute = 1, |
---|
356 | 355 | }; |
---|
357 | 356 | |
---|
358 | 357 | static struct snd_soc_dai_driver ak4535_dai = { |
---|