• Home
  • Raw
  • Download

Lines Matching +full:out +full:- +full:mono

2  * ak4641.c  --  AK4641 ALSA Soc Audio driver
80 if (ak4641->deemph && deemph_settings[i] != 0 && in ak4641_set_deemph()
81 abs(deemph_settings[i] - ak4641->playback_fs) < in ak4641_set_deemph()
82 abs(deemph_settings[best] - ak4641->playback_fs)) in ak4641_set_deemph()
85 if (!ak4641->deemph && deemph_settings[i] == 0) in ak4641_set_deemph()
89 dev_dbg(component->dev, "Set deemphasis %d\n", best); in ak4641_set_deemph()
99 int deemph = ucontrol->value.integer.value[0]; in ak4641_put_deemph()
102 return -EINVAL; in ak4641_put_deemph()
104 ak4641->deemph = deemph; in ak4641_put_deemph()
115 ucontrol->value.integer.value[0] = ak4641->deemph; in ak4641_get_deemph()
119 static const char *ak4641_mono_out[] = {"(L + R)/2", "Hi-Z"};
120 static const char *ak4641_hp_out[] = {"Stereo", "Mono"};
125 static const DECLARE_TLV_DB_SCALE(mono_gain_tlv, -1700, 2300, 0);
127 static const DECLARE_TLV_DB_SCALE(eq_tlv, -1050, 150, 0);
128 static const DECLARE_TLV_DB_SCALE(master_tlv, -12750, 50, 0);
129 static const DECLARE_TLV_DB_SCALE(mic_stereo_sidetone_tlv, -2700, 300, 0);
130 static const DECLARE_TLV_DB_SCALE(mic_mono_sidetone_tlv, -400, 400, 0);
131 static const DECLARE_TLV_DB_SCALE(capture_tlv, -800, 50, 0);
132 static const DECLARE_TLV_DB_SCALE(alc_tlv, -800, 50, 0);
133 static const DECLARE_TLV_DB_SCALE(aux_in_tlv, -2100, 300, 0);
146 SOC_ENUM("Mono 1 Output", ak4641_mono_out_enum),
147 SOC_SINGLE_TLV("Mono 1 Gain Volume", AK4641_SIG1, 7, 1, 1,
162 SOC_SINGLE("Left Out Enable Switch", AK4641_SIG2, 1, 1, 0),
163 SOC_SINGLE("Right Out Enable Switch", AK4641_SIG2, 0, 1, 0),
180 /* Mono 1 Mixer */
182 SOC_DAPM_SINGLE_TLV("Mic Mono Sidetone Volume", AK4641_VOL, 7, 1, 0,
184 SOC_DAPM_SINGLE("Mic Mono Sidetone Switch", AK4641_SIG1, 4, 1, 0),
185 SOC_DAPM_SINGLE("Mono Playback Switch", AK4641_SIG1, 5, 1, 0),
211 /* mono 2 switch */
230 SND_SOC_DAPM_SWITCH("Mono 2 Enable", SND_SOC_NOPM, 0, 0,
242 SND_SOC_DAPM_PGA("Mono Out", AK4641_PM1, 3, 0, NULL, 0),
243 SND_SOC_DAPM_PGA("Line Out", AK4641_PM1, 4, 0, NULL, 0),
246 SND_SOC_DAPM_PGA("Mono Out 2", AK4641_PM2, 3, 0, NULL, 0),
266 /* Mono 1 Mixer */
267 {"Mono1 Mixer", "Mic Mono Sidetone Switch", "Input Mux"},
268 {"Mono1 Mixer", "Mono Playback Switch", "DAC"},
282 /* Line Out */
283 {"LOUT", NULL, "Line Out"},
284 {"ROUT", NULL, "Line Out"},
285 {"Line Out", NULL, "Stereo Mixer"},
287 /* Mono 1 Out */
288 {"MOUT1", NULL, "Mono Out"},
289 {"Mono Out", NULL, "Mono1 Mixer"},
291 /* Mono 2 Out */
292 {"MOUT2", NULL, "Mono 2 Enable"},
293 {"Mono 2 Enable", "Switch", "Mono Out 2"},
294 {"Mono Out 2", NULL, "Stereo Mixer"},
296 {"Voice ADC", NULL, "Mono 2 Enable"},
310 struct snd_soc_component *component = codec_dai->component; in ak4641_set_dai_sysclk()
313 ak4641->sysclk = freq; in ak4641_set_dai_sysclk()
321 struct snd_soc_component *component = dai->component; in ak4641_i2s_hw_params()
327 fs = ak4641->sysclk / rate; in ak4641_i2s_hw_params()
329 return -EINVAL; in ak4641_i2s_hw_params()
343 dev_err(component->dev, "Error: unsupported fs=%d\n", fs); in ak4641_i2s_hw_params()
344 return -EINVAL; in ak4641_i2s_hw_params()
349 /* Update de-emphasis filter for the new rate */ in ak4641_i2s_hw_params()
350 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ak4641_i2s_hw_params()
351 ak4641->playback_fs = rate; in ak4641_i2s_hw_params()
361 struct snd_soc_component *component = codec_dai->component; in ak4641_pcm_set_dai_fmt()
380 return -EINVAL; in ak4641_pcm_set_dai_fmt()
393 struct snd_soc_component *component = codec_dai->component; in ak4641_i2s_set_dai_fmt()
405 return -EINVAL; in ak4641_i2s_set_dai_fmt()
413 struct snd_soc_component *component = dai->component; in ak4641_mute()
422 struct ak4641_platform_data *pdata = component->dev->platform_data; in ak4641_set_bias_level()
436 if (pdata && gpio_is_valid(pdata->gpio_power)) in ak4641_set_bias_level()
437 gpio_set_value(pdata->gpio_power, 1); in ak4641_set_bias_level()
439 if (pdata && gpio_is_valid(pdata->gpio_npdn)) in ak4641_set_bias_level()
440 gpio_set_value(pdata->gpio_npdn, 1); in ak4641_set_bias_level()
443 ret = regcache_sync(ak4641->regmap); in ak4641_set_bias_level()
445 dev_err(component->dev, in ak4641_set_bias_level()
455 if (pdata && gpio_is_valid(pdata->gpio_npdn)) in ak4641_set_bias_level()
456 gpio_set_value(pdata->gpio_npdn, 0); in ak4641_set_bias_level()
457 if (pdata && gpio_is_valid(pdata->gpio_power)) in ak4641_set_bias_level()
458 gpio_set_value(pdata->gpio_power, 0); in ak4641_set_bias_level()
459 regcache_mark_dirty(ak4641->regmap); in ak4641_set_bias_level()
486 .name = "ak4641-hifi",
506 .name = "ak4641-voice",
555 struct ak4641_platform_data *pdata = i2c->dev.platform_data; in ak4641_i2c_probe()
559 ak4641 = devm_kzalloc(&i2c->dev, sizeof(struct ak4641_priv), in ak4641_i2c_probe()
562 return -ENOMEM; in ak4641_i2c_probe()
564 ak4641->regmap = devm_regmap_init_i2c(i2c, &ak4641_regmap); in ak4641_i2c_probe()
565 if (IS_ERR(ak4641->regmap)) in ak4641_i2c_probe()
566 return PTR_ERR(ak4641->regmap); in ak4641_i2c_probe()
569 if (gpio_is_valid(pdata->gpio_power)) { in ak4641_i2c_probe()
570 ret = gpio_request_one(pdata->gpio_power, in ak4641_i2c_probe()
575 if (gpio_is_valid(pdata->gpio_npdn)) { in ak4641_i2c_probe()
576 ret = gpio_request_one(pdata->gpio_npdn, in ak4641_i2c_probe()
582 gpio_set_value(pdata->gpio_npdn, 1); in ak4641_i2c_probe()
588 ret = devm_snd_soc_register_component(&i2c->dev, in ak4641_i2c_probe()
598 if (gpio_is_valid(pdata->gpio_power)) in ak4641_i2c_probe()
599 gpio_set_value(pdata->gpio_power, 0); in ak4641_i2c_probe()
600 if (gpio_is_valid(pdata->gpio_npdn)) in ak4641_i2c_probe()
601 gpio_free(pdata->gpio_npdn); in ak4641_i2c_probe()
604 if (pdata && gpio_is_valid(pdata->gpio_power)) in ak4641_i2c_probe()
605 gpio_free(pdata->gpio_power); in ak4641_i2c_probe()
612 struct ak4641_platform_data *pdata = i2c->dev.platform_data; in ak4641_i2c_remove()
615 if (gpio_is_valid(pdata->gpio_power)) { in ak4641_i2c_remove()
616 gpio_set_value(pdata->gpio_power, 0); in ak4641_i2c_remove()
617 gpio_free(pdata->gpio_power); in ak4641_i2c_remove()
619 if (gpio_is_valid(pdata->gpio_npdn)) in ak4641_i2c_remove()
620 gpio_free(pdata->gpio_npdn); in ak4641_i2c_remove()