Lines Matching refs:component

72 	struct snd_soc_component *component;  member
156 struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol); in snd_soc_dapm_put_volsw_aic3x() local
157 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in snd_soc_dapm_put_volsw_aic3x()
183 change = snd_soc_component_test_bits(component, reg, mask, val); in snd_soc_dapm_put_volsw_aic3x()
209 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in mic_bias_event() local
210 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in mic_bias_event()
215 snd_soc_component_update_bits(component, MICBIAS_CTRL, in mic_bias_event()
221 snd_soc_component_update_bits(component, MICBIAS_CTRL, in mic_bias_event()
999 static int aic3x_add_widgets(struct snd_soc_component *component) in aic3x_add_widgets() argument
1001 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_add_widgets()
1002 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in aic3x_add_widgets()
1042 struct snd_soc_component *component = dai->component; in aic3x_hw_params() local
1043 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_hw_params()
1054 data = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLB) & (~(0x3 << 4)); in aic3x_hw_params()
1068 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLB, data); in aic3x_hw_params()
1083 snd_soc_component_write(component, AIC3X_PLL_PROGA_REG, pll_q << PLLQ_SHIFT); in aic3x_hw_params()
1084 snd_soc_component_write(component, AIC3X_GPIOB_REG, CODEC_CLKIN_CLKDIV); in aic3x_hw_params()
1086 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, PLL_ENABLE, 0); in aic3x_hw_params()
1089 snd_soc_component_write(component, AIC3X_GPIOB_REG, CODEC_CLKIN_PLLDIV); in aic3x_hw_params()
1091 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, in aic3x_hw_params()
1101 snd_soc_component_write(component, AIC3X_CODEC_DATAPATH_REG, data); in aic3x_hw_params()
1110 snd_soc_component_write(component, AIC3X_SAMPLE_RATE_SEL_REG, data); in aic3x_hw_params()
1179 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, PLLP_MASK, pll_p); in aic3x_hw_params()
1180 snd_soc_component_write(component, AIC3X_OVRF_STATUS_AND_PLLR_REG, in aic3x_hw_params()
1182 snd_soc_component_write(component, AIC3X_PLL_PROGB_REG, pll_j << PLLJ_SHIFT); in aic3x_hw_params()
1183 snd_soc_component_write(component, AIC3X_PLL_PROGC_REG, in aic3x_hw_params()
1185 snd_soc_component_write(component, AIC3X_PLL_PROGD_REG, in aic3x_hw_params()
1194 struct snd_soc_component *component = dai->component; in aic3x_prepare() local
1195 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_prepare()
1209 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLC, delay); in aic3x_prepare()
1216 struct snd_soc_component *component = dai->component; in aic3x_mute() local
1217 u8 ldac_reg = snd_soc_component_read(component, LDAC_VOL) & ~MUTE_ON; in aic3x_mute()
1218 u8 rdac_reg = snd_soc_component_read(component, RDAC_VOL) & ~MUTE_ON; in aic3x_mute()
1221 snd_soc_component_write(component, LDAC_VOL, ldac_reg | MUTE_ON); in aic3x_mute()
1222 snd_soc_component_write(component, RDAC_VOL, rdac_reg | MUTE_ON); in aic3x_mute()
1224 snd_soc_component_write(component, LDAC_VOL, ldac_reg); in aic3x_mute()
1225 snd_soc_component_write(component, RDAC_VOL, rdac_reg); in aic3x_mute()
1234 struct snd_soc_component *component = codec_dai->component; in aic3x_set_dai_sysclk() local
1235 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_set_dai_sysclk()
1238 snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, PLLCLK_IN_MASK, in aic3x_set_dai_sysclk()
1240 snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, CLKDIV_IN_MASK, in aic3x_set_dai_sysclk()
1250 struct snd_soc_component *component = codec_dai->component; in aic3x_set_dai_fmt() local
1251 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_set_dai_fmt()
1254 iface_areg = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLA) & 0x3f; in aic3x_set_dai_fmt()
1255 iface_breg = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLB) & 0x3f; in aic3x_set_dai_fmt()
1305 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLA, iface_areg); in aic3x_set_dai_fmt()
1306 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLB, iface_breg); in aic3x_set_dai_fmt()
1315 struct snd_soc_component *component = codec_dai->component; in aic3x_set_dai_tdm_slot() local
1316 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_set_dai_tdm_slot()
1320 dev_err(component->dev, "tx and rx masks must be symmetric\n"); in aic3x_set_dai_tdm_slot()
1325 dev_err(component->dev, "tx and rx masks need to be non 0\n"); in aic3x_set_dai_tdm_slot()
1332 dev_err(component->dev, "Invalid mask, slots must be adjacent\n"); in aic3x_set_dai_tdm_slot()
1343 dev_err(component->dev, "Unsupported slot width %d\n", slot_width); in aic3x_set_dai_tdm_slot()
1352 snd_soc_component_update_bits(component, AIC3X_ASD_INTF_CTRLA, in aic3x_set_dai_tdm_slot()
1378 static int aic3x_set_power(struct snd_soc_component *component, int power) in aic3x_set_power() argument
1380 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_set_power()
1404 pll_c = snd_soc_component_read(component, AIC3X_PLL_PROGC_REG); in aic3x_set_power()
1405 pll_d = snd_soc_component_read(component, AIC3X_PLL_PROGD_REG); in aic3x_set_power()
1408 snd_soc_component_write(component, AIC3X_PLL_PROGC_REG, pll_c); in aic3x_set_power()
1409 snd_soc_component_write(component, AIC3X_PLL_PROGD_REG, pll_d); in aic3x_set_power()
1423 snd_soc_component_write(component, AIC3X_RESET, SOFT_RESET); in aic3x_set_power()
1435 static int aic3x_set_bias_level(struct snd_soc_component *component, in aic3x_set_bias_level() argument
1438 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_set_bias_level()
1444 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY && in aic3x_set_bias_level()
1447 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, in aic3x_set_bias_level()
1453 aic3x_set_power(component, 1); in aic3x_set_bias_level()
1454 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE && in aic3x_set_bias_level()
1457 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, in aic3x_set_bias_level()
1463 aic3x_set_power(component, 0); in aic3x_set_bias_level()
1503 static void aic3x_mono_init(struct snd_soc_component *component) in aic3x_mono_init() argument
1506 snd_soc_component_write(component, DACL1_2_MONOLOPM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_mono_init()
1507 snd_soc_component_write(component, DACR1_2_MONOLOPM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_mono_init()
1510 snd_soc_component_update_bits(component, MONOLOPM_CTRL, UNMUTE, UNMUTE); in aic3x_mono_init()
1513 snd_soc_component_write(component, PGAL_2_MONOLOPM_VOL, DEFAULT_VOL); in aic3x_mono_init()
1514 snd_soc_component_write(component, PGAR_2_MONOLOPM_VOL, DEFAULT_VOL); in aic3x_mono_init()
1517 snd_soc_component_write(component, LINE2L_2_MONOLOPM_VOL, DEFAULT_VOL); in aic3x_mono_init()
1518 snd_soc_component_write(component, LINE2R_2_MONOLOPM_VOL, DEFAULT_VOL); in aic3x_mono_init()
1525 static int aic3x_init(struct snd_soc_component *component) in aic3x_init() argument
1527 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_init()
1529 snd_soc_component_write(component, AIC3X_PAGE_SELECT, PAGE0_SELECT); in aic3x_init()
1530 snd_soc_component_write(component, AIC3X_RESET, SOFT_RESET); in aic3x_init()
1533 snd_soc_component_write(component, LDAC_VOL, DEFAULT_VOL | MUTE_ON); in aic3x_init()
1534 snd_soc_component_write(component, RDAC_VOL, DEFAULT_VOL | MUTE_ON); in aic3x_init()
1537 snd_soc_component_write(component, DACL1_2_HPLOUT_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1538 snd_soc_component_write(component, DACR1_2_HPROUT_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1539 snd_soc_component_write(component, DACL1_2_HPLCOM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1540 snd_soc_component_write(component, DACR1_2_HPRCOM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1542 snd_soc_component_write(component, DACL1_2_LLOPM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1543 snd_soc_component_write(component, DACR1_2_RLOPM_VOL, DEFAULT_VOL | ROUTE_ON); in aic3x_init()
1546 snd_soc_component_update_bits(component, LLOPM_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1547 snd_soc_component_update_bits(component, RLOPM_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1548 snd_soc_component_update_bits(component, HPLOUT_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1549 snd_soc_component_update_bits(component, HPROUT_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1550 snd_soc_component_update_bits(component, HPLCOM_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1551 snd_soc_component_update_bits(component, HPRCOM_CTRL, UNMUTE, UNMUTE); in aic3x_init()
1554 snd_soc_component_write(component, LADC_VOL, DEFAULT_GAIN); in aic3x_init()
1555 snd_soc_component_write(component, RADC_VOL, DEFAULT_GAIN); in aic3x_init()
1557 snd_soc_component_write(component, LINE1L_2_LADC_CTRL, 0x0); in aic3x_init()
1558 snd_soc_component_write(component, LINE1R_2_RADC_CTRL, 0x0); in aic3x_init()
1561 snd_soc_component_write(component, PGAL_2_HPLOUT_VOL, DEFAULT_VOL); in aic3x_init()
1562 snd_soc_component_write(component, PGAR_2_HPROUT_VOL, DEFAULT_VOL); in aic3x_init()
1563 snd_soc_component_write(component, PGAL_2_HPLCOM_VOL, DEFAULT_VOL); in aic3x_init()
1564 snd_soc_component_write(component, PGAR_2_HPRCOM_VOL, DEFAULT_VOL); in aic3x_init()
1566 snd_soc_component_write(component, PGAL_2_LLOPM_VOL, DEFAULT_VOL); in aic3x_init()
1567 snd_soc_component_write(component, PGAR_2_RLOPM_VOL, DEFAULT_VOL); in aic3x_init()
1572 snd_soc_component_write(component, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL); in aic3x_init()
1573 snd_soc_component_write(component, LINE2R_2_HPROUT_VOL, DEFAULT_VOL); in aic3x_init()
1574 snd_soc_component_write(component, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL); in aic3x_init()
1575 snd_soc_component_write(component, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL); in aic3x_init()
1577 snd_soc_component_write(component, LINE2L_2_LLOPM_VOL, DEFAULT_VOL); in aic3x_init()
1578 snd_soc_component_write(component, LINE2R_2_RLOPM_VOL, DEFAULT_VOL); in aic3x_init()
1585 aic3x_mono_init(component); in aic3x_init()
1588 snd_soc_component_write(component, CLASSD_CTRL, 0); in aic3x_init()
1593 snd_soc_component_update_bits(component, HPOUT_SC, HPOUT_SC_OCMV_MASK, in aic3x_init()
1599 static int aic3x_component_probe(struct snd_soc_component *component) in aic3x_component_probe() argument
1601 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component); in aic3x_component_probe()
1604 aic3x->component = component; in aic3x_component_probe()
1613 dev_err(component->dev, in aic3x_component_probe()
1621 aic3x_init(component); in aic3x_component_probe()
1626 snd_soc_component_write(component, AIC3X_GPIO1_REG, in aic3x_component_probe()
1628 snd_soc_component_write(component, AIC3X_GPIO2_REG, in aic3x_component_probe()
1631 dev_warn(component->dev, "GPIO functionality is not supported on tlv320aic3104\n"); in aic3x_component_probe()
1639 snd_soc_add_component_controls(component, aic3x_extra_snd_controls, in aic3x_component_probe()
1641 snd_soc_add_component_controls(component, aic3x_mono_controls, in aic3x_component_probe()
1645 snd_soc_add_component_controls(component, aic3x_extra_snd_controls, in aic3x_component_probe()
1647 snd_soc_add_component_controls(component, in aic3x_component_probe()
1659 snd_soc_component_update_bits(component, MICBIAS_CTRL, in aic3x_component_probe()
1672 aic3x_add_widgets(component); in aic3x_component_probe()