Lines Matching +full:break +full:- +full:control

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8940.c -- WM8940 ALSA Soc Audio driver
12 * Notch filter control
107 { 0x4, 0x0010 }, /* Interface Control */
108 { 0x5, 0x0000 }, /* Companding Control */
109 { 0x6, 0x0140 }, /* Clock Control */
111 { 0x8, 0x0000 }, /* GPIO Control */
112 { 0x9, 0x0002 }, /* Auto Increment Control */
113 { 0xa, 0x0000 }, /* DAC Control */
116 { 0xe, 0x0100 }, /* ADC Control */
118 { 0x10, 0x0000 }, /* Notch Filter 1 Control 1 */
119 { 0x11, 0x0000 }, /* Notch Filter 1 Control 2 */
120 { 0x12, 0x0000 }, /* Notch Filter 2 Control 1 */
121 { 0x13, 0x0000 }, /* Notch Filter 2 Control 2 */
122 { 0x14, 0x0000 }, /* Notch Filter 3 Control 1 */
123 { 0x15, 0x0000 }, /* Notch Filter 3 Control 2 */
124 { 0x16, 0x0000 }, /* Notch Filter 4 Control 1 */
125 { 0x17, 0x0000 }, /* Notch Filter 4 Control 2 */
126 { 0x18, 0x0032 }, /* DAC Limit Control 1 */
127 { 0x19, 0x0000 }, /* DAC Limit Control 2 */
129 { 0x20, 0x0038 }, /* ALC Control 1 */
130 { 0x21, 0x000B }, /* ALC Control 2 */
131 { 0x22, 0x0032 }, /* ALC Control 3 */
138 { 0x2a, 0x0030 }, /* ALC Control 4 */
140 { 0x2c, 0x0002 }, /* Input Control */
143 { 0x2f, 0x0002 }, /* ADC Boost Control */
145 { 0x31, 0x0002 }, /* Output Control */
146 { 0x32, 0x0000 }, /* Speaker Mixer Control */
150 { 0x38, 0x0000 }, /* Mono Mixer Control */
153 static const char *wm8940_companding[] = { "Off", "NC", "u-law", "A-law" };
171 static DECLARE_TLV_DB_SCALE(wm8940_spk_vol_tlv, -5700, 100, 1);
172 static DECLARE_TLV_DB_SCALE(wm8940_att_tlv, -1000, 1000, 0);
173 static DECLARE_TLV_DB_SCALE(wm8940_pga_vol_tlv, -1200, 75, 0);
174 static DECLARE_TLV_DB_SCALE(wm8940_alc_min_tlv, -1200, 600, 0);
176 static DECLARE_TLV_DB_SCALE(wm8940_alc_tar_tlv, -2250, 50, 0);
178 static DECLARE_TLV_DB_SCALE(wm8940_lim_thresh_tlv, -600, 100, 0);
179 static DECLARE_TLV_DB_SCALE(wm8940_adc_tlv, -12750, 50, 1);
256 static DECLARE_TLV_DB_SCALE(wm8940_boost_vol_tlv, -1500, 300, 1);
339 struct snd_soc_component *component = codec_dai->component; in wm8940_set_dai_fmt()
346 break; in wm8940_set_dai_fmt()
348 break; in wm8940_set_dai_fmt()
350 return -EINVAL; in wm8940_set_dai_fmt()
357 break; in wm8940_set_dai_fmt()
360 break; in wm8940_set_dai_fmt()
362 break; in wm8940_set_dai_fmt()
365 break; in wm8940_set_dai_fmt()
368 break; in wm8940_set_dai_fmt()
373 break; in wm8940_set_dai_fmt()
376 break; in wm8940_set_dai_fmt()
379 break; in wm8940_set_dai_fmt()
382 break; in wm8940_set_dai_fmt()
394 struct snd_soc_component *component = dai->component; in wm8940_i2s_hw_params()
401 /* LoutR control */ in wm8940_i2s_hw_params()
402 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE in wm8940_i2s_hw_params()
409 break; in wm8940_i2s_hw_params()
412 break; in wm8940_i2s_hw_params()
415 break; in wm8940_i2s_hw_params()
418 break; in wm8940_i2s_hw_params()
421 break; in wm8940_i2s_hw_params()
424 break; in wm8940_i2s_hw_params()
433 break; in wm8940_i2s_hw_params()
435 break; in wm8940_i2s_hw_params()
438 break; in wm8940_i2s_hw_params()
441 break; in wm8940_i2s_hw_params()
444 break; in wm8940_i2s_hw_params()
457 struct snd_soc_component *component = dai->component; in wm8940_mute()
482 break; in wm8940_set_bias_level()
485 break; in wm8940_set_bias_level()
490 break; in wm8940_set_bias_level()
493 ret = regcache_sync(wm8940->regmap); in wm8940_set_bias_level()
495 dev_err(component->dev, "Failed to sync cache: %d\n", ret); in wm8940_set_bias_level()
504 break; in wm8940_set_bias_level()
507 break; in wm8940_set_bias_level()
576 struct snd_soc_component *component = codec_dai->component; in wm8940_set_dai_pll()
617 struct snd_soc_component *component = codec_dai->component; in wm8940_set_dai_sysclk()
626 wm8940->sysclk = freq; in wm8940_set_dai_sysclk()
629 return -EINVAL; in wm8940_set_dai_sysclk()
635 struct snd_soc_component *component = codec_dai->component; in wm8940_set_dai_clkdiv()
643 break; in wm8940_set_dai_clkdiv()
647 break; in wm8940_set_dai_clkdiv()
651 break; in wm8940_set_dai_clkdiv()
675 .name = "wm8940-hifi",
696 struct wm8940_setup_data *pdata = component->dev->platform_data; in wm8940_probe()
702 dev_err(component->dev, "Failed to issue reset\n"); in wm8940_probe()
713 dev_warn(component->dev, "No platform data supplied\n"); in wm8940_probe()
716 ret = snd_soc_component_write(component, WM8940_OUTPUTCTL, reg | pdata->vroi); in wm8940_probe()
757 wm8940 = devm_kzalloc(&i2c->dev, sizeof(struct wm8940_priv), in wm8940_i2c_probe()
760 return -ENOMEM; in wm8940_i2c_probe()
762 wm8940->regmap = devm_regmap_init_i2c(i2c, &wm8940_regmap); in wm8940_i2c_probe()
763 if (IS_ERR(wm8940->regmap)) in wm8940_i2c_probe()
764 return PTR_ERR(wm8940->regmap); in wm8940_i2c_probe()
768 ret = devm_snd_soc_register_component(&i2c->dev, in wm8940_i2c_probe()