• Home
  • Raw
  • Download

Lines Matching +full:inverted +full:- +full:rx

2  * wm8753.c  --  WM8753 ALSA Soc Audio driver
4 * Copyright 2003-11 Wolfson Microelectronics PLC.
16 * Dual DAI:-
27 * Fast DAI switching:-
170 static const char *wm8753_dac_phase[] = {"Non Inverted", "Inverted"};
171 static const char *wm8753_line_mix[] = {"Line 1 + 2", "Line 1 - 2",
173 static const char *wm8753_mono_mux[] = {"Line Mix", "Rx Mix"};
174 static const char *wm8753_right_mux[] = {"Line 2", "Rx Mix"};
175 static const char *wm8753_left_mux[] = {"Line 1", "Rx Mix"};
176 static const char *wm8753_rxmsel[] = {"RXP - RXN", "RXP + RXN", "RXP", "RXN"};
179 static const char *wm8753_mono2_src[] = {"Inverted Mono 1", "Left", "Right",
183 static const char *wm8753_radcsel[] = {"PGA", "Line or RXP-RXN", "Sidetone"};
184 static const char *wm8753_ladcsel[] = {"PGA", "Line or RXP-RXN", "Line"};
194 static const char *wm8753_rout2_phase[] = {"Non Inverted", "Inverted"};
235 ucontrol->value.enumerated.item[0] = wm8753->dai_func; in wm8753_get_dai()
246 if (wm8753->dai_func == ucontrol->value.enumerated.item[0]) in wm8753_set_dai()
250 return -EBUSY; in wm8753_set_dai()
254 wm8753->dai_func = ucontrol->value.enumerated.item[0]; in wm8753_set_dai()
256 if (((ioctl >> 2) & 0x3) == wm8753->dai_func) in wm8753_set_dai()
259 ioctl = (ioctl & 0x1f3) | (wm8753->dai_func << 2); in wm8753_set_dai()
263 wm8753_hifi_write_dai_fmt(component, wm8753->hifi_fmt); in wm8753_set_dai()
264 wm8753_voice_write_dai_fmt(component, wm8753->voice_fmt); in wm8753_set_dai()
269 static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 300, 0);
271 static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1);
272 static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
274 /* 0000000 - 0101111 = "Analogue mute" */
275 0, 48, TLV_DB_SCALE_ITEM(-25500, 0, 0),
276 48, 127, TLV_DB_SCALE_ITEM(-7300, 100, 0)
278 static const DECLARE_TLV_DB_SCALE(mix_tlv, -1500, 300, 0);
279 static const DECLARE_TLV_DB_SCALE(voice_mix_tlv, -1200, 300, 0);
280 static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
283 SOC_SINGLE("Hi-Fi DAC Left/Right channel Swap", WM8753_HIFI, 5, 1, 0),
320 SOC_ENUM("Treble Cut-off", wm8753_enum[2]),
333 SOC_ENUM("Capture Filter Cut-off", wm8753_enum[24]),
348 SOC_ENUM("3D Upper Cut-off", wm8753_enum[6]),
349 SOC_ENUM("3D Lower Cut-off", wm8753_enum[7]),
356 SOC_ENUM("De-emphasis", wm8753_enum[8]),
438 SOC_DAPM_SINGLE("Rx Capture Switch", WM8753_INCTL2, 0, 1, 0),
457 /* Rx mux and mixer */
523 SND_SOC_DAPM_MUX("Rx Mixer", WM8753_PWR2, 1, 0,
580 {"Mono 2 Mux", "Inverted Mono 1", "MONO1"},
615 {"Capture Left Mux", "Line or RXP-RXN", "Line Left Mux"},
620 {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"},
623 /* Mono Capture mixer-mux */
649 {"ALC Mixer", "Rx Capture Switch", "Rx Mixer"},
653 {"Line Left Mux", "Rx Mix", "Rx Mixer"},
657 {"Line Right Mux", "Rx Mix", "Rx Mixer"},
661 {"Line Mono Mux", "Rx Mix", "Rx Mixer"},
665 {"Line Mixer", "Line 1 - 2", "LINE1"},
667 {"Line Mixer", "Line 1 - 2", "LINE2"},
671 /* Rx Mixer/Mux */
672 {"Rx Mixer", "RXP - RXN", "RXP"},
673 {"Rx Mixer", "RXP + RXN", "RXP"},
674 {"Rx Mixer", "RXP - RXN", "RXN"},
675 {"Rx Mixer", "RXP + RXN", "RXN"},
676 {"Rx Mixer", "RXP", "RXP"},
677 {"Rx Mixer", "RXN", "RXN"},
716 pll_div->div2 = 1; in pll_factors()
719 pll_div->div2 = 0; in pll_factors()
725 pll_div->n = Ndiv; in pll_factors()
740 pll_div->k = K; in pll_factors()
748 struct snd_soc_component *component = codec_dai->component; in wm8753_set_dai_pll()
751 return -ENODEV; in wm8753_set_dai_pll()
860 return -EINVAL; in get_coeff()
869 struct snd_soc_component *component = codec_dai->component; in wm8753_set_dai_sysclk()
879 wm8753->sysclk = freq; in wm8753_set_dai_sysclk()
882 wm8753->pcmclk = freq; in wm8753_set_dai_sysclk()
887 return -EINVAL; in wm8753_set_dai_sysclk()
915 return -EINVAL; in wm8753_vdac_adc_set_dai_fmt()
929 struct snd_soc_component *component = dai->component; in wm8753_pcm_hw_params()
950 if (params_rate(params) * 384 == wm8753->pcmclk) in wm8753_pcm_hw_params()
979 return -EINVAL; in wm8753_pcm_set_dai_fmt()
994 return -EINVAL; in wm8753_pcm_set_dai_fmt()
1014 return -EINVAL; in wm8753_pcm_set_dai_fmt()
1018 return -EINVAL; in wm8753_pcm_set_dai_fmt()
1029 struct snd_soc_component *component = codec_dai->component; in wm8753_set_dai_clkdiv()
1046 return -EINVAL; in wm8753_set_dai_clkdiv()
1076 return -EINVAL; in wm8753_hdac_set_dai_fmt()
1104 return -EINVAL; in wm8753_i2s_set_dai_fmt()
1119 return -EINVAL; in wm8753_i2s_set_dai_fmt()
1139 return -EINVAL; in wm8753_i2s_set_dai_fmt()
1143 return -EINVAL; in wm8753_i2s_set_dai_fmt()
1158 struct snd_soc_component *component = dai->component; in wm8753_i2s_hw_params()
1165 coeff = get_coeff(wm8753->sysclk, params_rate(params)); in wm8753_i2s_hw_params()
1232 return -EINVAL; in wm8753_mode3_4_set_dai_fmt()
1242 switch (wm8753->dai_func) { in wm8753_hifi_write_dai_fmt()
1265 struct snd_soc_component *component = codec_dai->component; in wm8753_hifi_set_dai_fmt()
1268 wm8753->hifi_fmt = fmt; in wm8753_hifi_set_dai_fmt()
1279 if (wm8753->dai_func != 0) in wm8753_voice_write_dai_fmt()
1295 struct snd_soc_component *component = codec_dai->component; in wm8753_voice_set_dai_fmt()
1298 wm8753->voice_fmt = fmt; in wm8753_voice_set_dai_fmt()
1305 struct snd_soc_component *component = dai->component; in wm8753_mute()
1311 if (mute && wm8753->dai_func == 1) { in wm8753_mute()
1330 regmap_update_bits(wm8753->regmap, WM8753_PWR1, 0x0180, 0x0100); in wm8753_charge_work()
1346 flush_delayed_work(&wm8753->charge_work); in wm8753_set_bias_level()
1352 schedule_delayed_work(&wm8753->charge_work, in wm8753_set_bias_level()
1360 cancel_delayed_work_sync(&wm8753->charge_work); in wm8753_set_bias_level()
1381 * 1. Voice over PCM DAI - HIFI DAC over HIFI DAI
1382 * 2. Voice over HIFI DAI - HIFI disabled
1383 * 3. Voice disabled - HIFI over HIFI
1384 * 4. Voice disabled - HIFI over HIFI, uses voice DAI LRC for capture
1406 { .name = "wm8753-hifi",
1424 { .name = "wm8753-voice",
1447 regcache_sync(wm8753->regmap); in wm8753_resume()
1457 INIT_DELAYED_WORK(&wm8753->charge_work, wm8753_charge_work); in wm8753_probe()
1461 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in wm8753_probe()
1465 wm8753->dai_func = 0; in wm8753_probe()
1523 wm8753 = devm_kzalloc(&spi->dev, sizeof(struct wm8753_priv), in wm8753_spi_probe()
1526 return -ENOMEM; in wm8753_spi_probe()
1530 wm8753->regmap = devm_regmap_init_spi(spi, &wm8753_regmap); in wm8753_spi_probe()
1531 if (IS_ERR(wm8753->regmap)) { in wm8753_spi_probe()
1532 ret = PTR_ERR(wm8753->regmap); in wm8753_spi_probe()
1533 dev_err(&spi->dev, "Failed to allocate register map: %d\n", in wm8753_spi_probe()
1538 ret = devm_snd_soc_register_component(&spi->dev, &soc_component_dev_wm8753, in wm8753_spi_probe()
1541 dev_err(&spi->dev, "Failed to register CODEC: %d\n", ret); in wm8753_spi_probe()
1562 wm8753 = devm_kzalloc(&i2c->dev, sizeof(struct wm8753_priv), in wm8753_i2c_probe()
1565 return -ENOMEM; in wm8753_i2c_probe()
1569 wm8753->regmap = devm_regmap_init_i2c(i2c, &wm8753_regmap); in wm8753_i2c_probe()
1570 if (IS_ERR(wm8753->regmap)) { in wm8753_i2c_probe()
1571 ret = PTR_ERR(wm8753->regmap); in wm8753_i2c_probe()
1572 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in wm8753_i2c_probe()
1577 ret = devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_wm8753, in wm8753_i2c_probe()
1580 dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret); in wm8753_i2c_probe()