Lines Matching defs:component
56 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
66 adc_reg = snd_soc_component_read(component, AIC32X4_ADCSETUP);
67 snd_soc_component_write(component, AIC32X4_ADCSETUP, adc_reg |
69 snd_soc_component_write(component, AIC32X4_ADCSETUP, adc_reg);
78 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
83 snd_soc_component_update_bits(component, AIC32X4_MICBIAS,
90 snd_soc_component_update_bits(component, AIC32X4_MICBIAS,
104 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
107 val = snd_soc_component_read(component, AIC32X4_DINCTL);
117 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
121 val = snd_soc_component_read(component, AIC32X4_DOUTCTL);
137 snd_soc_component_write(component, AIC32X4_DOUTCTL, val);
145 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
148 val = snd_soc_component_read(component, AIC32X4_SCLKCTL);
158 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
162 val = snd_soc_component_read(component, AIC32X4_MISOCTL);
178 snd_soc_component_write(component, AIC32X4_MISOCTL, val);
186 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
189 val = snd_soc_component_read(component, AIC32X4_GPIOCTL);
198 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
202 val = snd_soc_component_read(component, AIC32X4_GPIOCTL);
218 snd_soc_component_write(component, AIC32X4_GPIOCTL, val);
594 struct snd_soc_component *component = codec_dai->component;
598 pll = devm_clk_get(component->dev, "pll");
609 struct snd_soc_component *component = codec_dai->component;
653 snd_soc_component_update_bits(component, AIC32X4_IFACE1,
656 snd_soc_component_update_bits(component, AIC32X4_IFACE2,
658 snd_soc_component_update_bits(component, AIC32X4_IFACE3,
664 static int aic32x4_set_aosr(struct snd_soc_component *component, u8 aosr)
666 return snd_soc_component_write(component, AIC32X4_AOSR, aosr);
669 static int aic32x4_set_dosr(struct snd_soc_component *component, u16 dosr)
671 snd_soc_component_write(component, AIC32X4_DOSRMSB, dosr >> 8);
672 snd_soc_component_write(component, AIC32X4_DOSRLSB,
678 static int aic32x4_set_processing_blocks(struct snd_soc_component *component,
684 snd_soc_component_write(component, AIC32X4_ADCSPB, r_block);
685 snd_soc_component_write(component, AIC32X4_DACSPB, p_block);
690 static int aic32x4_setup_clocks(struct snd_soc_component *component,
711 ret = devm_clk_bulk_get(component->dev, ARRAY_SIZE(clocks), clocks);
720 aic32x4_set_processing_blocks(component, 1, 1);
726 aic32x4_set_processing_blocks(component, 1, 9);
732 aic32x4_set_processing_blocks(component, 13, 19);
734 dev_err(component->dev, "Sampling rate not supported\n");
768 aic32x4_set_aosr(component,
776 aic32x4_set_dosr(component,
790 dev_err(component->dev,
799 struct snd_soc_component *component = dai->component;
800 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
804 aic32x4_setup_clocks(component, params_rate(params),
826 snd_soc_component_update_bits(component, AIC32X4_IFACE1,
837 snd_soc_component_update_bits(component, AIC32X4_DACSETUP,
845 struct snd_soc_component *component = dai->component;
847 snd_soc_component_update_bits(component, AIC32X4_DACMUTE,
853 static int aic32x4_set_bias_level(struct snd_soc_component *component,
864 ret = devm_clk_bulk_get(component->dev, ARRAY_SIZE(clocks), clocks);
872 dev_err(component->dev, "Failed to enable clocks\n");
880 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF)
922 static void aic32x4_setup_gpios(struct snd_soc_component *component)
924 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
929 snd_soc_component_write(component, AIC32X4_DINCTL,
931 snd_soc_add_component_controls(component, aic32x4_mfp1,
937 snd_soc_component_write(component, AIC32X4_DOUTCTL,
939 snd_soc_add_component_controls(component, aic32x4_mfp2,
945 snd_soc_component_write(component, AIC32X4_SCLKCTL,
947 snd_soc_add_component_controls(component, aic32x4_mfp3,
953 snd_soc_component_write(component, AIC32X4_MISOCTL,
955 snd_soc_add_component_controls(component, aic32x4_mfp4,
961 snd_soc_component_write(component, AIC32X4_GPIOCTL,
963 snd_soc_add_component_controls(component, aic32x4_mfp5,
968 static int aic32x4_component_probe(struct snd_soc_component *component)
970 struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
981 ret = devm_clk_bulk_get(component->dev, ARRAY_SIZE(clocks), clocks);
986 aic32x4_setup_gpios(component);
993 snd_soc_component_write(component, AIC32X4_MICBIAS,
997 snd_soc_component_write(component, AIC32X4_PWRCFG, AIC32X4_AVDDWEAKDISABLE);
1001 snd_soc_component_write(component, AIC32X4_LDOCTL, tmp_reg);
1003 tmp_reg = snd_soc_component_read(component, AIC32X4_CMMODE);
1008 snd_soc_component_write(component, AIC32X4_CMMODE, tmp_reg);
1012 snd_soc_component_write(component, AIC32X4_LMICPGANIN,
1015 snd_soc_component_write(component, AIC32X4_LMICPGANIN,
1018 snd_soc_component_write(component, AIC32X4_RMICPGANIN,
1021 snd_soc_component_write(component, AIC32X4_RMICPGANIN,
1029 tmp_reg = snd_soc_component_read(component, AIC32X4_ADCSETUP);
1030 snd_soc_component_write(component, AIC32X4_ADCSETUP, tmp_reg |
1032 snd_soc_component_write(component, AIC32X4_ADCSETUP, tmp_reg);
1038 snd_soc_component_write(component, AIC32X4_REFPOWERUP,
1253 dev_err(dev, "Failed to register component\n");