Lines Matching defs:component

39 static int aic31xx_set_jack(struct snd_soc_component *component,
162 struct snd_soc_component *component;
411 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
412 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
445 dev_err(component->dev, "Unknown widget '%s' calling %s\n",
458 dev_dbg(component->dev,
514 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
515 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
520 snd_soc_component_update_bits(component, AIC31XX_MICBIAS,
524 dev_dbg(component->dev, "%s: turned on\n", __func__);
528 snd_soc_component_update_bits(component, AIC31XX_MICBIAS,
530 dev_dbg(component->dev, "%s: turned off\n", __func__);
775 static int aic31xx_add_controls(struct snd_soc_component *component)
778 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
782 component, aic31xx_snd_controls,
789 component, aic311x_snd_controls,
793 component, aic310x_snd_controls,
799 static int aic31xx_add_widgets(struct snd_soc_component *component)
801 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
802 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
856 static int aic31xx_setup_pll(struct snd_soc_component *component,
859 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
867 dev_err(component->dev, "Master clock not supplied\n");
873 snd_soc_component_update_bits(component, AIC31XX_CLKMUX,
875 snd_soc_component_update_bits(component, AIC31XX_IFACE2,
894 dev_err(component->dev,
901 dev_warn(component->dev, "Can not produce exact bitclock");
913 snd_soc_component_update_bits(component, AIC31XX_PLLPR, AIC31XX_PLL_MASK,
915 snd_soc_component_write(component, AIC31XX_PLLJ, aic31xx_divs[i].pll_j);
917 snd_soc_component_write(component, AIC31XX_PLLDMSB,
919 snd_soc_component_write(component, AIC31XX_PLLDLSB,
923 snd_soc_component_update_bits(component, AIC31XX_NDAC, AIC31XX_PLL_MASK,
925 snd_soc_component_update_bits(component, AIC31XX_MDAC, AIC31XX_PLL_MASK,
928 snd_soc_component_write(component, AIC31XX_DOSRMSB, aic31xx_divs[i].dosr >> 8);
929 snd_soc_component_write(component, AIC31XX_DOSRLSB, aic31xx_divs[i].dosr & 0xff);
932 snd_soc_component_update_bits(component, AIC31XX_NADC, AIC31XX_PLL_MASK,
934 snd_soc_component_update_bits(component, AIC31XX_MADC, AIC31XX_PLL_MASK,
937 snd_soc_component_write(component, AIC31XX_AOSR, aic31xx_divs[i].aosr);
940 snd_soc_component_update_bits(component, AIC31XX_BCLKN,
945 dev_dbg(component->dev,
966 struct snd_soc_component *component = dai->component;
967 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
970 dev_dbg(component->dev, "## %s: width %d rate %d\n",
990 dev_err(component->dev, "%s: Unsupported width %d\n",
995 snd_soc_component_update_bits(component, AIC31XX_IFACE1,
1009 return aic31xx_setup_pll(component, params);
1015 struct snd_soc_component *component = codec_dai->component;
1018 snd_soc_component_update_bits(component, AIC31XX_DACMUTE,
1022 snd_soc_component_update_bits(component, AIC31XX_DACMUTE,
1029 static int aic31xx_clock_master_routes(struct snd_soc_component *component,
1032 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
1033 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1079 struct snd_soc_component *component = codec_dai->component;
1084 dev_dbg(component->dev, "## %s: fmt = 0x%x\n", __func__, fmt);
1099 dev_err(component->dev, "Invalid DAI clock provider\n");
1111 dev_err(component->dev, "Invalid DAI clock signal polarity\n");
1141 dev_err(component->dev, "Invalid DAI interface format\n");
1145 snd_soc_component_update_bits(component, AIC31XX_IFACE1,
1149 snd_soc_component_update_bits(component, AIC31XX_DATA_OFFSET,
1152 snd_soc_component_update_bits(component, AIC31XX_IFACE2,
1156 return aic31xx_clock_master_routes(component, fmt);
1162 struct snd_soc_component *component = codec_dai->component;
1163 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1166 dev_dbg(component->dev, "## %s: clk_id = %d, freq = %d, dir = %d\n",
1189 snd_soc_component_update_bits(component, AIC31XX_CLKMUX, AIC31XX_PLL_CLKIN_MASK,
1236 static void aic31xx_clk_on(struct snd_soc_component *component)
1238 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1242 dev_dbg(component->dev, "codec clock -> on (rate %d)\n",
1244 snd_soc_component_update_bits(component, AIC31XX_PLLPR, mask, on);
1246 snd_soc_component_update_bits(component, AIC31XX_NDAC, mask, on);
1247 snd_soc_component_update_bits(component, AIC31XX_MDAC, mask, on);
1249 snd_soc_component_update_bits(component, AIC31XX_NADC, mask, on);
1251 snd_soc_component_update_bits(component, AIC31XX_MADC, mask, on);
1252 snd_soc_component_update_bits(component, AIC31XX_BCLKN, mask, on);
1255 static void aic31xx_clk_off(struct snd_soc_component *component)
1260 dev_dbg(component->dev, "codec clock -> off\n");
1261 snd_soc_component_update_bits(component, AIC31XX_BCLKN, mask, off);
1262 snd_soc_component_update_bits(component, AIC31XX_MADC, mask, off);
1263 snd_soc_component_update_bits(component, AIC31XX_NADC, mask, off);
1264 snd_soc_component_update_bits(component, AIC31XX_MDAC, mask, off);
1265 snd_soc_component_update_bits(component, AIC31XX_NDAC, mask, off);
1266 snd_soc_component_update_bits(component, AIC31XX_PLLPR, mask, off);
1269 static int aic31xx_power_on(struct snd_soc_component *component)
1271 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1288 dev_err(component->dev,
1301 aic31xx_set_jack(component, aic31xx->jack, NULL);
1306 static void aic31xx_power_off(struct snd_soc_component *component)
1308 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1315 static int aic31xx_set_bias_level(struct snd_soc_component *component,
1318 dev_dbg(component->dev, "## %s: %d -> %d\n", __func__,
1319 snd_soc_component_get_bias_level(component), level);
1325 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY)
1326 aic31xx_clk_on(component);
1329 switch (snd_soc_component_get_bias_level(component)) {
1331 aic31xx_power_on(component);
1334 aic31xx_clk_off(component);
1341 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY)
1342 aic31xx_power_off(component);
1349 static int aic31xx_set_jack(struct snd_soc_component *component,
1352 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1363 static int aic31xx_codec_probe(struct snd_soc_component *component)
1365 struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
1370 aic31xx->component = component;
1380 dev_err(component->dev,
1390 ret = aic31xx_add_controls(component);
1394 ret = aic31xx_add_widgets(component);
1399 snd_soc_component_update_bits(component, AIC31XX_HPDRIVER,