Lines Matching defs:component

38 static int aic31xx_set_jack(struct snd_soc_component *component,
161 struct snd_soc_component *component;
388 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
389 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
422 dev_err(component->dev, "Unknown widget '%s' calling %s\n",
435 dev_dbg(component->dev,
491 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
492 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
497 snd_soc_component_update_bits(component, AIC31XX_MICBIAS,
501 dev_dbg(component->dev, "%s: turned on\n", __func__);
505 snd_soc_component_update_bits(component, AIC31XX_MICBIAS,
507 dev_dbg(component->dev, "%s: turned off\n", __func__);
752 static int aic31xx_add_controls(struct snd_soc_component *component)
755 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
759 component, aic31xx_snd_controls,
766 component, aic311x_snd_controls,
770 component, aic310x_snd_controls,
776 static int aic31xx_add_widgets(struct snd_soc_component *component)
778 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
779 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
833 static int aic31xx_setup_pll(struct snd_soc_component *component,
836 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
844 dev_err(component->dev, "Master clock not supplied\n");
850 snd_soc_component_update_bits(component, AIC31XX_CLKMUX,
852 snd_soc_component_update_bits(component, AIC31XX_IFACE2,
871 dev_err(component->dev,
878 dev_warn(component->dev, "Can not produce exact bitclock");
890 snd_soc_component_update_bits(component, AIC31XX_PLLPR, AIC31XX_PLL_MASK,
892 snd_soc_component_write(component, AIC31XX_PLLJ, aic31xx_divs[i].pll_j);
894 snd_soc_component_write(component, AIC31XX_PLLDMSB,
896 snd_soc_component_write(component, AIC31XX_PLLDLSB,
900 snd_soc_component_update_bits(component, AIC31XX_NDAC, AIC31XX_PLL_MASK,
902 snd_soc_component_update_bits(component, AIC31XX_MDAC, AIC31XX_PLL_MASK,
905 snd_soc_component_write(component, AIC31XX_DOSRMSB, aic31xx_divs[i].dosr >> 8);
906 snd_soc_component_write(component, AIC31XX_DOSRLSB, aic31xx_divs[i].dosr & 0xff);
909 snd_soc_component_update_bits(component, AIC31XX_NADC, AIC31XX_PLL_MASK,
911 snd_soc_component_update_bits(component, AIC31XX_MADC, AIC31XX_PLL_MASK,
914 snd_soc_component_write(component, AIC31XX_AOSR, aic31xx_divs[i].aosr);
917 snd_soc_component_update_bits(component, AIC31XX_BCLKN,
922 dev_dbg(component->dev,
943 struct snd_soc_component *component = dai->component;
946 dev_dbg(component->dev, "## %s: width %d rate %d\n",
966 dev_err(component->dev, "%s: Unsupported width %d\n",
971 snd_soc_component_update_bits(component, AIC31XX_IFACE1,
975 return aic31xx_setup_pll(component, params);
981 struct snd_soc_component *component = codec_dai->component;
984 snd_soc_component_update_bits(component, AIC31XX_DACMUTE,
988 snd_soc_component_update_bits(component, AIC31XX_DACMUTE,
995 static int aic31xx_clock_master_routes(struct snd_soc_component *component,
998 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
999 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1045 struct snd_soc_component *component = codec_dai->component;
1050 dev_dbg(component->dev, "## %s: fmt = 0x%x\n", __func__, fmt);
1066 dev_err(component->dev, "Invalid DAI master/slave interface\n");
1078 dev_err(component->dev, "Invalid DAI clock signal polarity\n");
1108 dev_err(component->dev, "Invalid DAI interface format\n");
1112 snd_soc_component_update_bits(component, AIC31XX_IFACE1,
1116 snd_soc_component_update_bits(component, AIC31XX_DATA_OFFSET,
1119 snd_soc_component_update_bits(component, AIC31XX_IFACE2,
1123 return aic31xx_clock_master_routes(component, fmt);
1129 struct snd_soc_component *component = codec_dai->component;
1130 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1133 dev_dbg(component->dev, "## %s: clk_id = %d, freq = %d, dir = %d\n",
1156 snd_soc_component_update_bits(component, AIC31XX_CLKMUX, AIC31XX_PLL_CLKIN_MASK,
1202 static void aic31xx_clk_on(struct snd_soc_component *component)
1204 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1208 dev_dbg(component->dev, "codec clock -> on (rate %d)\n",
1210 snd_soc_component_update_bits(component, AIC31XX_PLLPR, mask, on);
1212 snd_soc_component_update_bits(component, AIC31XX_NDAC, mask, on);
1213 snd_soc_component_update_bits(component, AIC31XX_MDAC, mask, on);
1215 snd_soc_component_update_bits(component, AIC31XX_NADC, mask, on);
1217 snd_soc_component_update_bits(component, AIC31XX_MADC, mask, on);
1218 snd_soc_component_update_bits(component, AIC31XX_BCLKN, mask, on);
1221 static void aic31xx_clk_off(struct snd_soc_component *component)
1226 dev_dbg(component->dev, "codec clock -> off\n");
1227 snd_soc_component_update_bits(component, AIC31XX_BCLKN, mask, off);
1228 snd_soc_component_update_bits(component, AIC31XX_MADC, mask, off);
1229 snd_soc_component_update_bits(component, AIC31XX_NADC, mask, off);
1230 snd_soc_component_update_bits(component, AIC31XX_MDAC, mask, off);
1231 snd_soc_component_update_bits(component, AIC31XX_NDAC, mask, off);
1232 snd_soc_component_update_bits(component, AIC31XX_PLLPR, mask, off);
1235 static int aic31xx_power_on(struct snd_soc_component *component)
1237 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1254 dev_err(component->dev,
1267 aic31xx_set_jack(component, aic31xx->jack, NULL);
1272 static void aic31xx_power_off(struct snd_soc_component *component)
1274 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1281 static int aic31xx_set_bias_level(struct snd_soc_component *component,
1284 dev_dbg(component->dev, "## %s: %d -> %d\n", __func__,
1285 snd_soc_component_get_bias_level(component), level);
1291 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY)
1292 aic31xx_clk_on(component);
1295 switch (snd_soc_component_get_bias_level(component)) {
1297 aic31xx_power_on(component);
1300 aic31xx_clk_off(component);
1307 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY)
1308 aic31xx_power_off(component);
1315 static int aic31xx_set_jack(struct snd_soc_component *component,
1318 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1329 static int aic31xx_codec_probe(struct snd_soc_component *component)
1331 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1336 aic31xx->component = component;
1346 dev_err(component->dev,
1356 ret = aic31xx_add_controls(component);
1360 ret = aic31xx_add_widgets(component);
1365 snd_soc_component_update_bits(component, AIC31XX_HPDRIVER,