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