• Home
  • Raw
  • Download

Lines Matching +full:boost +full:- +full:bypass

2  * wm9712.c  --  ALSA Soc WM9712 codec support
4 * Copyright 2006-12 Wolfson Microelectronics PLC.
110 static const char *wm9712_base[] = {"Linear Control", "Adaptive Boost"};
119 static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0);
170 SOC_SINGLE("PCBeep Bypass Headphone Volume", AC97_PC_BEEP, 12, 7, 1),
171 SOC_SINGLE("PCBeep Bypass Speaker Volume", AC97_PC_BEEP, 8, 7, 1),
172 SOC_SINGLE("PCBeep Bypass Phone Volume", AC97_PC_BEEP, 4, 7, 1),
181 SOC_SINGLE_TLV("Capture Boost Switch", AC97_REC_SEL, 14, 1, 0, boost_tlv),
182 SOC_SINGLE_TLV("Capture to Phone Boost Switch", AC97_REC_SEL, 11, 1, 1,
185 SOC_SINGLE("3D Upper Cut-off Switch", AC97_3D_CONTROL, 5, 1, 1),
186 SOC_SINGLE("3D Lower Cut-off Switch", AC97_3D_CONTROL, 4, 1, 1),
190 SOC_SINGLE("Bass Cut-off Switch", AC97_MASTER_TONE, 12, 1, 1),
191 SOC_SINGLE("Tone Cut-off Switch", AC97_MASTER_TONE, 4, 1, 1),
192 SOC_SINGLE("Playback Attenuate (-6dB) Switch", AC97_MASTER_TONE, 6, 1, 0),
203 SOC_SINGLE_TLV("Mic Boost Volume", AC97_MIC, 7, 1, 0, boost_tlv),
225 unsigned int val = ucontrol->value.integer.value[0]; in wm9712_hp_mixer_put()
227 (struct soc_mixer_control *)kcontrol->private_value; in wm9712_hp_mixer_put()
232 mixer = mc->shift >> 8; in wm9712_hp_mixer_put()
233 shift = mc->shift & 0xff; in wm9712_hp_mixer_put()
236 mutex_lock(&wm9712->lock); in wm9712_hp_mixer_put()
237 old = wm9712->hp_mixer[mixer]; in wm9712_hp_mixer_put()
238 if (ucontrol->value.integer.value[0]) in wm9712_hp_mixer_put()
239 wm9712->hp_mixer[mixer] |= mask; in wm9712_hp_mixer_put()
241 wm9712->hp_mixer[mixer] &= ~mask; in wm9712_hp_mixer_put()
243 change = old != wm9712->hp_mixer[mixer]; in wm9712_hp_mixer_put()
248 if ((wm9712->hp_mixer[0] & mask) || in wm9712_hp_mixer_put()
249 (wm9712->hp_mixer[1] & mask)) in wm9712_hp_mixer_put()
258 mutex_unlock(&wm9712->lock); in wm9712_hp_mixer_put()
270 (struct soc_mixer_control *)kcontrol->private_value; in wm9712_hp_mixer_get()
273 mixer = mc->shift >> 8; in wm9712_hp_mixer_get()
274 shift = mc->shift & 0xff; in wm9712_hp_mixer_get()
276 ucontrol->value.integer.value[0] = in wm9712_hp_mixer_get()
277 (wm9712->hp_mixer[mixer] >> shift) & 1; in wm9712_hp_mixer_get()
292 WM9712_HP_MIXER_CTRL("PCBeep Bypass Switch", HPL_MIXER, 5),
294 WM9712_HP_MIXER_CTRL("Phone Bypass Switch", HPL_MIXER, 3),
295 WM9712_HP_MIXER_CTRL("Line Bypass Switch", HPL_MIXER, 2),
302 WM9712_HP_MIXER_CTRL("PCBeep Bypass Switch", HPR_MIXER, 5),
304 WM9712_HP_MIXER_CTRL("Phone Bypass Switch", HPR_MIXER, 3),
305 WM9712_HP_MIXER_CTRL("Line Bypass Switch", HPR_MIXER, 2),
312 SOC_DAPM_SINGLE("PCBeep Bypass Switch", AC97_PC_BEEP, 11, 1, 1),
314 SOC_DAPM_SINGLE("Phone Bypass Switch", AC97_PHONE, 14, 1, 1),
315 SOC_DAPM_SINGLE("Line Bypass Switch", AC97_LINE, 14, 1, 1),
321 SOC_DAPM_SINGLE("PCBeep Bypass Switch", AC97_PC_BEEP, 7, 1, 1),
323 SOC_DAPM_SINGLE("Line Bypass Switch", AC97_LINE, 13, 1, 1),
419 /* virtual mixer - mixes left & right channels for spk and mono */
424 {"Left HP Mixer", "PCBeep Bypass Switch", "PCBEEP"},
426 {"Left HP Mixer", "Phone Bypass Switch", "Phone PGA"},
427 {"Left HP Mixer", "Line Bypass Switch", "Line PGA"},
433 {"Right HP Mixer", "PCBeep Bypass Switch", "PCBEEP"},
435 {"Right HP Mixer", "Phone Bypass Switch", "Phone PGA"},
436 {"Right HP Mixer", "Line Bypass Switch", "Line PGA"},
442 {"Speaker Mixer", "PCBeep Bypass Switch", "PCBEEP"},
443 {"Speaker Mixer", "Line Bypass Switch", "Line PGA"},
445 {"Speaker Mixer", "Phone Bypass Switch", "Phone PGA"},
449 {"Phone Mixer", "PCBeep Bypass Switch", "PCBEEP"},
450 {"Phone Mixer", "Line Bypass Switch", "Line PGA"},
530 struct snd_soc_component *component = dai->component; in ac97_prepare()
532 struct snd_pcm_runtime *runtime = substream->runtime; in ac97_prepare()
536 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in ac97_prepare()
541 return snd_soc_component_write(component, reg, runtime->rate); in ac97_prepare()
547 struct snd_soc_component *component = dai->component; in ac97_aux_prepare()
548 struct snd_pcm_runtime *runtime = substream->runtime; in ac97_aux_prepare()
553 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in ac97_aux_prepare()
554 return -ENODEV; in ac97_aux_prepare()
556 return snd_soc_component_write(component, AC97_PCM_SURR_DAC_RATE, runtime->rate); in ac97_aux_prepare()
573 .name = "wm9712-hifi",
589 .name = "wm9712-aux",
624 ret = snd_ac97_reset(wm9712->ac97, true, WM9712_VENDOR_ID, in wm9712_soc_resume()
642 if (wm9712->mfd_pdata) { in wm9712_soc_probe()
643 wm9712->ac97 = wm9712->mfd_pdata->ac97; in wm9712_soc_probe()
644 regmap = wm9712->mfd_pdata->regmap; in wm9712_soc_probe()
648 wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID, in wm9712_soc_probe()
650 if (IS_ERR(wm9712->ac97)) { in wm9712_soc_probe()
651 ret = PTR_ERR(wm9712->ac97); in wm9712_soc_probe()
652 dev_err(component->dev, in wm9712_soc_probe()
657 regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config); in wm9712_soc_probe()
659 snd_soc_free_ac97_component(wm9712->ac97); in wm9712_soc_probe()
663 return -ENXIO; in wm9712_soc_probe()
678 if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS) && !wm9712->mfd_pdata) { in wm9712_soc_remove()
680 snd_soc_free_ac97_component(wm9712->ac97); in wm9712_soc_remove()
706 wm9712 = devm_kzalloc(&pdev->dev, sizeof(*wm9712), GFP_KERNEL); in wm9712_probe()
708 return -ENOMEM; in wm9712_probe()
710 mutex_init(&wm9712->lock); in wm9712_probe()
712 wm9712->mfd_pdata = dev_get_platdata(&pdev->dev); in wm9712_probe()
715 return devm_snd_soc_register_component(&pdev->dev, in wm9712_probe()
721 .name = "wm9712-codec",