• Home
  • Raw
  • Download

Lines Matching +full:codec +full:- +full:aif3

2  * wm5102.c  --  WM5102 ALSA SoC Audio driver
37 #define DRV_NAME "wm5102-codec"
45 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
46 static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
47 static DECLARE_TLV_DB_SCALE(noise_tlv, -13200, 600, 0);
48 static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
586 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm5102_sysclk_ev()
587 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_sysclk_ev()
588 struct regmap *regmap = arizona->regmap; in wm5102_sysclk_ev()
592 switch (arizona->rev) { in wm5102_sysclk_ev()
625 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm5102_adsp_power_ev()
626 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_adsp_power_ev()
632 ret = regmap_read(arizona->regmap, ARIZONA_SYSTEM_CLOCK_1, &v); in wm5102_adsp_power_ev()
634 dev_err(component->dev, in wm5102_adsp_power_ev()
636 return -EIO; in wm5102_adsp_power_ev()
644 dev_err(component->dev, in wm5102_adsp_power_ev()
654 dev_warn(component->dev, in wm5102_adsp_power_ev()
669 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_out_comp_coeff_get()
671 mutex_lock(&arizona->dac_comp_lock); in wm5102_out_comp_coeff_get()
672 put_unaligned_be16(arizona->dac_comp_coeff, in wm5102_out_comp_coeff_get()
673 ucontrol->value.bytes.data); in wm5102_out_comp_coeff_get()
674 mutex_unlock(&arizona->dac_comp_lock); in wm5102_out_comp_coeff_get()
683 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_out_comp_coeff_put()
685 mutex_lock(&arizona->dac_comp_lock); in wm5102_out_comp_coeff_put()
686 memcpy(&arizona->dac_comp_coeff, ucontrol->value.bytes.data, in wm5102_out_comp_coeff_put()
687 sizeof(arizona->dac_comp_coeff)); in wm5102_out_comp_coeff_put()
688 arizona->dac_comp_coeff = be16_to_cpu(arizona->dac_comp_coeff); in wm5102_out_comp_coeff_put()
689 mutex_unlock(&arizona->dac_comp_lock); in wm5102_out_comp_coeff_put()
698 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_out_comp_switch_get()
700 mutex_lock(&arizona->dac_comp_lock); in wm5102_out_comp_switch_get()
701 ucontrol->value.integer.value[0] = arizona->dac_comp_enabled; in wm5102_out_comp_switch_get()
702 mutex_unlock(&arizona->dac_comp_lock); in wm5102_out_comp_switch_get()
711 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in wm5102_out_comp_switch_put()
713 mutex_lock(&arizona->dac_comp_lock); in wm5102_out_comp_switch_put()
714 arizona->dac_comp_enabled = ucontrol->value.integer.value[0]; in wm5102_out_comp_switch_put()
715 mutex_unlock(&arizona->dac_comp_lock); in wm5102_out_comp_switch_put()
1505 { "AIF3 Capture", NULL, "DBVDD3" },
1506 { "AIF3 Playback", NULL, "DBVDD3" },
1580 { "AIF3 Capture", NULL, "AIF3TX1" },
1581 { "AIF3 Capture", NULL, "AIF3TX2" },
1583 { "AIF3RX1", NULL, "AIF3 Playback" },
1584 { "AIF3RX2", NULL, "AIF3 Playback" },
1610 { "AIF3 Playback", NULL, "SYSCLK" },
1617 { "AIF3 Capture", NULL, "SYSCLK" },
1747 return arizona_set_fll(&wm5102->fll[0], source, Fref, Fout); in wm5102_set_fll()
1749 return arizona_set_fll(&wm5102->fll[1], source, Fref, Fout); in wm5102_set_fll()
1751 return arizona_set_fll_refclk(&wm5102->fll[0], source, Fref, in wm5102_set_fll()
1754 return arizona_set_fll_refclk(&wm5102->fll[1], source, Fref, in wm5102_set_fll()
1757 return -EINVAL; in wm5102_set_fll()
1768 .name = "wm5102-aif1",
1790 .name = "wm5102-aif2",
1812 .name = "wm5102-aif3",
1816 .stream_name = "AIF3 Playback",
1823 .stream_name = "AIF3 Capture",
1834 .name = "wm5102-slim1",
1853 .name = "wm5102-slim2",
1872 .name = "wm5102-slim3",
1891 .name = "wm5102-cpu-trace",
1902 .name = "wm5102-dsp-trace",
1915 struct snd_soc_pcm_runtime *rtd = stream->private_data; in wm5102_open()
1919 return wm_adsp_compr_open(&priv->core.adsp[0], stream); in wm5102_open()
1925 struct arizona *arizona = priv->core.arizona; in wm5102_adsp2_irq()
1928 ret = wm_adsp_compr_handle_irq(&priv->core.adsp[0]); in wm5102_adsp2_irq()
1929 if (ret == -ENODEV) { in wm5102_adsp2_irq()
1930 dev_err(arizona->dev, "Spurious compressed data IRQ\n"); in wm5102_adsp2_irq()
1941 struct arizona *arizona = priv->core.arizona; in wm5102_component_probe()
1944 snd_soc_component_init_regmap(component, arizona->regmap); in wm5102_component_probe()
1946 ret = wm_adsp2_component_probe(&priv->core.adsp[0], component); in wm5102_component_probe()
1963 priv->core.arizona->dapm = dapm; in wm5102_component_probe()
1968 wm_adsp2_component_remove(&priv->core.adsp[0], component); in wm5102_component_probe()
1977 wm_adsp2_component_remove(&priv->core.adsp[0], component); in wm5102_component_remove()
1979 priv->core.arizona->dapm = NULL; in wm5102_component_remove()
2026 struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); in wm5102_probe()
2030 wm5102 = devm_kzalloc(&pdev->dev, sizeof(struct wm5102_priv), in wm5102_probe()
2033 return -ENOMEM; in wm5102_probe()
2037 if (!dev_get_platdata(arizona->dev)) { in wm5102_probe()
2044 mutex_init(&arizona->dac_comp_lock); in wm5102_probe()
2046 wm5102->core.arizona = arizona; in wm5102_probe()
2047 wm5102->core.num_inputs = 6; in wm5102_probe()
2049 arizona_init_dvfs(&wm5102->core); in wm5102_probe()
2051 wm5102->core.adsp[0].part = "wm5102"; in wm5102_probe()
2052 wm5102->core.adsp[0].num = 1; in wm5102_probe()
2053 wm5102->core.adsp[0].type = WMFW_ADSP2; in wm5102_probe()
2054 wm5102->core.adsp[0].base = ARIZONA_DSP1_CONTROL_1; in wm5102_probe()
2055 wm5102->core.adsp[0].dev = arizona->dev; in wm5102_probe()
2056 wm5102->core.adsp[0].regmap = arizona->regmap; in wm5102_probe()
2057 wm5102->core.adsp[0].mem = wm5102_dsp1_regions; in wm5102_probe()
2058 wm5102->core.adsp[0].num_mems = ARRAY_SIZE(wm5102_dsp1_regions); in wm5102_probe()
2060 ret = wm_adsp2_init(&wm5102->core.adsp[0]); in wm5102_probe()
2064 for (i = 0; i < ARRAY_SIZE(wm5102->fll); i++) in wm5102_probe()
2065 wm5102->fll[i].vco_mult = 1; in wm5102_probe()
2067 arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, in wm5102_probe()
2069 &wm5102->fll[0]); in wm5102_probe()
2070 arizona_init_fll(arizona, 2, ARIZONA_FLL2_CONTROL_1 - 1, in wm5102_probe()
2072 &wm5102->fll[1]); in wm5102_probe()
2075 regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_2, in wm5102_probe()
2077 regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_3, in wm5102_probe()
2081 arizona_init_dai(&wm5102->core, i); in wm5102_probe()
2085 regmap_update_bits(arizona->regmap, wm5102_digital_vu[i], in wm5102_probe()
2088 pm_runtime_enable(&pdev->dev); in wm5102_probe()
2089 pm_runtime_idle(&pdev->dev); in wm5102_probe()
2095 dev_err(&pdev->dev, "Failed to request DSP IRQ: %d\n", ret); in wm5102_probe()
2101 dev_warn(&pdev->dev, in wm5102_probe()
2114 ret = devm_snd_soc_register_component(&pdev->dev, in wm5102_probe()
2119 dev_err(&pdev->dev, "Failed to register component: %d\n", ret); in wm5102_probe()
2137 struct arizona *arizona = wm5102->core.arizona; in wm5102_remove()
2139 pm_runtime_disable(&pdev->dev); in wm5102_remove()
2141 wm_adsp2_remove(&wm5102->core.adsp[0]); in wm5102_remove()
2153 .name = "wm5102-codec",
2164 MODULE_ALIAS("platform:wm5102-codec");