• Home
  • Raw
  • Download

Lines Matching +full:out +full:- +full:volume +full:- +full:limit

2  * es8316.c -- es8316 ALSA SoC audio driver
5 * Authors: David Yang <yangxiaohua@everest-semi.com>,
22 #include <sound/soc-dapm.h>
44 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9600, 50, 1);
45 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9600, 50, 1);
46 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_max_gain_tlv, -650, 150, 0);
47 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_min_gain_tlv, -1200, 150, 0);
48 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_target_tlv, -1650, 150, 0);
50 0, 4, TLV_DB_SCALE_ITEM(-1200, 150, 0),
51 8, 11, TLV_DB_SCALE_ITEM(-450, 150, 0),
55 0, 0, TLV_DB_SCALE_ITEM(-350, 0, 0),
69 0, 0, TLV_DB_SCALE_ITEM(-4800, 0, 0),
70 1, 3, TLV_DB_SCALE_ITEM(-2400, 1200, 0),
87 SOC_DOUBLE_TLV("Headphone Playback Volume", ES8316_CPHP_ICAL_VOL,
89 SOC_DOUBLE_TLV("Headphone Mixer Volume", ES8316_HPMIX_VOL,
93 SOC_DOUBLE_R_TLV("DAC Playback Volume", ES8316_DAC_VOLL,
103 SOC_SINGLE_TLV("ADC Capture Volume", ES8316_ADC_VOLUME,
105 SOC_SINGLE_TLV("ADC PGA Gain Volume", ES8316_ADC_PGAGAIN,
111 SOC_SINGLE_TLV("ALC Capture Max Volume", ES8316_ADC_ALC1, 0, 28, 0,
113 SOC_SINGLE_TLV("ALC Capture Min Volume", ES8316_ADC_ALC2, 0, 28, 0,
115 SOC_SINGLE_TLV("ALC Capture Target Volume", ES8316_ADC_ALC3, 4, 10, 0,
129 "lin1-rin1",
130 "lin2-rin2",
131 "lin1-rin1 with 20db Boost",
132 "lin2-rin2 with 20db Boost"
159 "lin1-rin1",
160 "lin2-rin2",
161 "lin-rin with Boost",
162 "lin-rin with Boost and PGA"
228 SND_SOC_DAPM_AIF_OUT("I2S OUT", "I2S1 Capture", 1,
252 SND_SOC_DAPM_PGA("Left Headphone Mixer Out", ES8316_HPMIX_PDN,
254 SND_SOC_DAPM_PGA("Right Headphone Mixer Out", ES8316_HPMIX_PDN,
270 SND_SOC_DAPM_SUPPLY("Headphone Out", ES8316_CPHP_PDN1, 2, 1, NULL, 0),
293 {"Differential Mux", "lin1-rin1", "MIC1"},
294 {"Differential Mux", "lin2-rin2", "MIC2"},
309 {"I2S OUT", NULL, "Digital Mic Mux"},
323 {"Left Headphone Mux", "lin-rin with Boost and PGA", "Line input PGA"},
324 {"Right Headphone Mux", "lin-rin with Boost and PGA", "Line input PGA"},
332 {"Left Headphone Mixer Out", NULL, "Left Headphone Mixer"},
333 {"Right Headphone Mixer Out", NULL, "Right Headphone Mixer"},
335 {"Left Headphone Charge Pump", NULL, "Left Headphone Mixer Out"},
336 {"Right Headphone Charge Pump", NULL, "Right Headphone Mixer Out"},
353 {"Headphone Out", NULL, "Bias"},
354 {"Headphone Out", NULL, "Analog power"},
355 {"HPOL", NULL, "Headphone Out"},
356 {"HPOR", NULL, "Headphone Out"},
362 struct snd_soc_component *component = codec_dai->component; in es8316_set_dai_sysclk()
367 es8316->sysclk = freq; in es8316_set_dai_sysclk()
372 /* Limit supported sample rates to ones that can be autodetected in es8316_set_dai_sysclk()
379 es8316->allowed_rates[count++] = freq / ratio; in es8316_set_dai_sysclk()
382 es8316->sysclk_constraints.list = es8316->allowed_rates; in es8316_set_dai_sysclk()
383 es8316->sysclk_constraints.count = count; in es8316_set_dai_sysclk()
391 struct snd_soc_component *component = codec_dai->component; in es8316_set_dai_fmt()
398 dev_err(component->dev, "Codec driver only supports slave mode\n"); in es8316_set_dai_fmt()
399 return -EINVAL; in es8316_set_dai_fmt()
403 dev_err(component->dev, "Codec driver only supports I2S format\n"); in es8316_set_dai_fmt()
404 return -EINVAL; in es8316_set_dai_fmt()
422 return -EINVAL; in es8316_set_dai_fmt()
442 struct snd_soc_component *component = dai->component; in es8316_pcm_startup()
445 if (es8316->sysclk == 0) { in es8316_pcm_startup()
446 dev_err(component->dev, "No sysclk provided\n"); in es8316_pcm_startup()
447 return -EINVAL; in es8316_pcm_startup()
453 snd_pcm_hw_constraint_list(substream->runtime, 0, in es8316_pcm_startup()
455 &es8316->sysclk_constraints); in es8316_pcm_startup()
464 struct snd_soc_component *component = dai->component; in es8316_pcm_hw_params()
468 if (!es8316->sysclk) { in es8316_pcm_hw_params()
469 dev_err(component->dev, "No MCLK configured\n"); in es8316_pcm_hw_params()
470 return -EINVAL; in es8316_pcm_hw_params()
487 return -EINVAL; in es8316_pcm_hw_params()
499 snd_soc_component_update_bits(dai->component, ES8316_DAC_SET1, 0x20, in es8316_mute()
551 * but here is a vendor-provided value that improves volume in es8316_probe()
585 es8316 = devm_kzalloc(&i2c_client->dev, sizeof(struct es8316_priv), in es8316_i2c_probe()
588 return -ENOMEM; in es8316_i2c_probe()
596 return devm_snd_soc_register_component(&i2c_client->dev, in es8316_i2c_probe()
631 MODULE_AUTHOR("David Yang <yangxiaohua@everest-semi.com>");