nau8822.c (39853b1438bf9b07349c8c44b48f6c2eda6f8840) | nau8822.c (54b5927067dd79b58032a4938ee13b233f1a368c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// 3// nau8822.c -- NAU8822 ALSA Soc Audio driver 4// 5// Copyright 2017 Nuvoton Technology Crop. 6// 7// Author: David Lin <ctlin0@nuvoton.com> 8// Co-author: John Hsu <kchsu0@nuvoton.com> --- 886 unchanged lines hidden (view full) --- 895 * to get the master clock prescaler configuration. 896 */ 897 if (nau8822->div_id == NAU8822_CLK_MCLK) 898 nau8822_config_clkdiv(dai, 0, params_rate(params)); 899 900 return 0; 901} 902 | 1// SPDX-License-Identifier: GPL-2.0 2// 3// nau8822.c -- NAU8822 ALSA Soc Audio driver 4// 5// Copyright 2017 Nuvoton Technology Crop. 6// 7// Author: David Lin <ctlin0@nuvoton.com> 8// Co-author: John Hsu <kchsu0@nuvoton.com> --- 886 unchanged lines hidden (view full) --- 895 * to get the master clock prescaler configuration. 896 */ 897 if (nau8822->div_id == NAU8822_CLK_MCLK) 898 nau8822_config_clkdiv(dai, 0, params_rate(params)); 899 900 return 0; 901} 902 |
903static int nau8822_mute(struct snd_soc_dai *dai, int mute) | 903static int nau8822_mute(struct snd_soc_dai *dai, int mute, int direction) |
904{ 905 struct snd_soc_component *component = dai->component; 906 907 dev_dbg(component->dev, "%s: %d\n", __func__, mute); 908 909 if (mute) 910 snd_soc_component_update_bits(component, 911 NAU8822_REG_DAC_CONTROL, 0x40, 0x40); --- 50 unchanged lines hidden (view full) --- 962 963#define NAU8822_RATES (SNDRV_PCM_RATE_8000_48000) 964 965#define NAU8822_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 966 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 967 968static const struct snd_soc_dai_ops nau8822_dai_ops = { 969 .hw_params = nau8822_hw_params, | 904{ 905 struct snd_soc_component *component = dai->component; 906 907 dev_dbg(component->dev, "%s: %d\n", __func__, mute); 908 909 if (mute) 910 snd_soc_component_update_bits(component, 911 NAU8822_REG_DAC_CONTROL, 0x40, 0x40); --- 50 unchanged lines hidden (view full) --- 962 963#define NAU8822_RATES (SNDRV_PCM_RATE_8000_48000) 964 965#define NAU8822_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 966 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 967 968static const struct snd_soc_dai_ops nau8822_dai_ops = { 969 .hw_params = nau8822_hw_params, |
970 .digital_mute = nau8822_mute, | 970 .mute_stream = nau8822_mute, |
971 .set_fmt = nau8822_set_dai_fmt, 972 .set_sysclk = nau8822_set_dai_sysclk, 973 .set_pll = nau8822_set_pll, | 971 .set_fmt = nau8822_set_dai_fmt, 972 .set_sysclk = nau8822_set_dai_sysclk, 973 .set_pll = nau8822_set_pll, |
974 .no_capture_mute = 1, |
|
974}; 975 976static struct snd_soc_dai_driver nau8822_dai = { 977 .name = "nau8822-hifi", 978 .playback = { 979 .stream_name = "Playback", 980 .channels_min = 1, 981 .channels_max = 2, --- 169 unchanged lines hidden --- | 975}; 976 977static struct snd_soc_dai_driver nau8822_dai = { 978 .name = "nau8822-hifi", 979 .playback = { 980 .stream_name = "Playback", 981 .channels_min = 1, 982 .channels_max = 2, --- 169 unchanged lines hidden --- |