.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier |
---|
3 | 4 | * |
---|
4 | | - * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com |
---|
| 5 | + * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Dan Murphy <dmurphy@ti.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or |
---|
9 | | - * modify it under the terms of the GNU General Public License |
---|
10 | | - * version 2 as published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but |
---|
13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | | - * General Public License for more details. |
---|
16 | 8 | */ |
---|
17 | 9 | |
---|
18 | 10 | #include <linux/module.h> |
---|
.. | .. |
---|
177 | 169 | pll_clkin += tas2552->tdm_delay; |
---|
178 | 170 | } |
---|
179 | 171 | |
---|
180 | | - pll_enable = snd_soc_component_read32(component, TAS2552_CFG_2) & TAS2552_PLL_ENABLE; |
---|
| 172 | + pll_enable = snd_soc_component_read(component, TAS2552_CFG_2) & TAS2552_PLL_ENABLE; |
---|
181 | 173 | snd_soc_component_update_bits(component, TAS2552_CFG_2, TAS2552_PLL_ENABLE, 0); |
---|
182 | 174 | |
---|
183 | 175 | if (pll_clkin == pll_clk) |
---|
.. | .. |
---|
195 | 187 | unsigned int d, q, t; |
---|
196 | 188 | u8 j; |
---|
197 | 189 | u8 pll_sel = (tas2552->pll_clk_id << 3) & TAS2552_PLL_SRC_MASK; |
---|
198 | | - u8 p = snd_soc_component_read32(component, TAS2552_PLL_CTRL_1); |
---|
| 190 | + u8 p = snd_soc_component_read(component, TAS2552_PLL_CTRL_1); |
---|
199 | 191 | |
---|
200 | 192 | p = (p >> 7); |
---|
201 | 193 | |
---|
.. | .. |
---|
415 | 407 | clk_id = TAS2552_PLL_CLKIN_BCLK; |
---|
416 | 408 | freq = 0; |
---|
417 | 409 | } |
---|
418 | | - /* fall through */ |
---|
| 410 | + fallthrough; |
---|
419 | 411 | case TAS2552_PLL_CLKIN_BCLK: |
---|
420 | 412 | case TAS2552_PLL_CLKIN_1_8_FIXED: |
---|
421 | 413 | mask = TAS2552_PLL_SRC_MASK; |
---|
.. | .. |
---|
473 | 465 | return 0; |
---|
474 | 466 | } |
---|
475 | 467 | |
---|
476 | | -static int tas2552_mute(struct snd_soc_dai *dai, int mute) |
---|
| 468 | +static int tas2552_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
477 | 469 | { |
---|
478 | 470 | u8 cfg1_reg = 0; |
---|
479 | 471 | struct snd_soc_component *component = dai->component; |
---|
.. | .. |
---|
527 | 519 | .set_sysclk = tas2552_set_dai_sysclk, |
---|
528 | 520 | .set_fmt = tas2552_set_dai_fmt, |
---|
529 | 521 | .set_tdm_slot = tas2552_set_dai_tdm_slot, |
---|
530 | | - .digital_mute = tas2552_mute, |
---|
| 522 | + .mute_stream = tas2552_mute, |
---|
| 523 | + .no_capture_mute = 1, |
---|
531 | 524 | }; |
---|
532 | 525 | |
---|
533 | 526 | /* Formats supported by TAS2552 driver. */ |
---|
.. | .. |
---|
610 | 603 | return 0; |
---|
611 | 604 | |
---|
612 | 605 | probe_fail: |
---|
| 606 | + pm_runtime_put_noidle(component->dev); |
---|
613 | 607 | gpiod_set_value(tas2552->enable_gpio, 0); |
---|
614 | 608 | |
---|
615 | 609 | regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), |
---|