Lines Matching defs:component

72 	struct snd_soc_component *component;
162 struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol);
163 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
189 change = snd_soc_component_test_bits(component, reg, mask, val);
215 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
216 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
221 snd_soc_component_update_bits(component, MICBIAS_CTRL,
227 snd_soc_component_update_bits(component, MICBIAS_CTRL,
1005 static int aic3x_add_widgets(struct snd_soc_component *component)
1007 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1008 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
1047 struct snd_soc_component *component = dai->component;
1048 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1059 data = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLB) & (~(0x3 << 4));
1073 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLB, data);
1088 snd_soc_component_write(component, AIC3X_PLL_PROGA_REG, pll_q << PLLQ_SHIFT);
1089 snd_soc_component_write(component, AIC3X_GPIOB_REG, CODEC_CLKIN_CLKDIV);
1091 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, PLL_ENABLE, 0);
1094 snd_soc_component_write(component, AIC3X_GPIOB_REG, CODEC_CLKIN_PLLDIV);
1096 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG,
1106 snd_soc_component_write(component, AIC3X_CODEC_DATAPATH_REG, data);
1115 snd_soc_component_write(component, AIC3X_SAMPLE_RATE_SEL_REG, data);
1184 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG, PLLP_MASK, pll_p);
1185 snd_soc_component_write(component, AIC3X_OVRF_STATUS_AND_PLLR_REG,
1187 snd_soc_component_write(component, AIC3X_PLL_PROGB_REG, pll_j << PLLJ_SHIFT);
1188 snd_soc_component_write(component, AIC3X_PLL_PROGC_REG,
1190 snd_soc_component_write(component, AIC3X_PLL_PROGD_REG,
1199 struct snd_soc_component *component = dai->component;
1200 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1214 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLC, delay);
1221 struct snd_soc_component *component = dai->component;
1222 u8 ldac_reg = snd_soc_component_read(component, LDAC_VOL) & ~MUTE_ON;
1223 u8 rdac_reg = snd_soc_component_read(component, RDAC_VOL) & ~MUTE_ON;
1226 snd_soc_component_write(component, LDAC_VOL, ldac_reg | MUTE_ON);
1227 snd_soc_component_write(component, RDAC_VOL, rdac_reg | MUTE_ON);
1229 snd_soc_component_write(component, LDAC_VOL, ldac_reg);
1230 snd_soc_component_write(component, RDAC_VOL, rdac_reg);
1239 struct snd_soc_component *component = codec_dai->component;
1240 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1243 snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, PLLCLK_IN_MASK,
1245 snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, CLKDIV_IN_MASK,
1255 struct snd_soc_component *component = codec_dai->component;
1256 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1259 iface_areg = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLA) & 0x3f;
1260 iface_breg = snd_soc_component_read(component, AIC3X_ASD_INTF_CTRLB) & 0x3f;
1311 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLA, iface_areg);
1312 snd_soc_component_write(component, AIC3X_ASD_INTF_CTRLB, iface_breg);
1321 struct snd_soc_component *component = codec_dai->component;
1322 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1326 dev_err(component->dev, "tx and rx masks must be symmetric\n");
1331 dev_err(component->dev, "tx and rx masks need to be non 0\n");
1338 dev_err(component->dev, "Invalid mask, slots must be adjacent\n");
1349 dev_err(component->dev, "Unsupported slot width %d\n", slot_width);
1358 snd_soc_component_update_bits(component, AIC3X_ASD_INTF_CTRLA,
1384 static int aic3x_set_power(struct snd_soc_component *component, int power)
1386 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1410 pll_c = snd_soc_component_read(component, AIC3X_PLL_PROGC_REG);
1411 pll_d = snd_soc_component_read(component, AIC3X_PLL_PROGD_REG);
1414 snd_soc_component_write(component, AIC3X_PLL_PROGC_REG, pll_c);
1415 snd_soc_component_write(component, AIC3X_PLL_PROGD_REG, pll_d);
1429 snd_soc_component_write(component, AIC3X_RESET, SOFT_RESET);
1441 static int aic3x_set_bias_level(struct snd_soc_component *component,
1444 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1450 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_STANDBY &&
1453 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG,
1459 aic3x_set_power(component, 1);
1460 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE &&
1463 snd_soc_component_update_bits(component, AIC3X_PLL_PROGA_REG,
1469 aic3x_set_power(component, 0);
1509 static void aic3x_mono_init(struct snd_soc_component *component)
1512 snd_soc_component_write(component, DACL1_2_MONOLOPM_VOL, DEFAULT_VOL | ROUTE_ON);
1513 snd_soc_component_write(component, DACR1_2_MONOLOPM_VOL, DEFAULT_VOL | ROUTE_ON);
1516 snd_soc_component_update_bits(component, MONOLOPM_CTRL, UNMUTE, UNMUTE);
1519 snd_soc_component_write(component, PGAL_2_MONOLOPM_VOL, DEFAULT_VOL);
1520 snd_soc_component_write(component, PGAR_2_MONOLOPM_VOL, DEFAULT_VOL);
1523 snd_soc_component_write(component, LINE2L_2_MONOLOPM_VOL, DEFAULT_VOL);
1524 snd_soc_component_write(component, LINE2R_2_MONOLOPM_VOL, DEFAULT_VOL);
1531 static int aic3x_init(struct snd_soc_component *component)
1533 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1535 snd_soc_component_write(component, AIC3X_PAGE_SELECT, PAGE0_SELECT);
1536 snd_soc_component_write(component, AIC3X_RESET, SOFT_RESET);
1539 snd_soc_component_write(component, LDAC_VOL, DEFAULT_VOL | MUTE_ON);
1540 snd_soc_component_write(component, RDAC_VOL, DEFAULT_VOL | MUTE_ON);
1543 snd_soc_component_write(component, DACL1_2_HPLOUT_VOL, DEFAULT_VOL | ROUTE_ON);
1544 snd_soc_component_write(component, DACR1_2_HPROUT_VOL, DEFAULT_VOL | ROUTE_ON);
1545 snd_soc_component_write(component, DACL1_2_HPLCOM_VOL, DEFAULT_VOL | ROUTE_ON);
1546 snd_soc_component_write(component, DACR1_2_HPRCOM_VOL, DEFAULT_VOL | ROUTE_ON);
1548 snd_soc_component_write(component, DACL1_2_LLOPM_VOL, DEFAULT_VOL | ROUTE_ON);
1549 snd_soc_component_write(component, DACR1_2_RLOPM_VOL, DEFAULT_VOL | ROUTE_ON);
1552 snd_soc_component_update_bits(component, LLOPM_CTRL, UNMUTE, UNMUTE);
1553 snd_soc_component_update_bits(component, RLOPM_CTRL, UNMUTE, UNMUTE);
1554 snd_soc_component_update_bits(component, HPLOUT_CTRL, UNMUTE, UNMUTE);
1555 snd_soc_component_update_bits(component, HPROUT_CTRL, UNMUTE, UNMUTE);
1556 snd_soc_component_update_bits(component, HPLCOM_CTRL, UNMUTE, UNMUTE);
1557 snd_soc_component_update_bits(component, HPRCOM_CTRL, UNMUTE, UNMUTE);
1560 snd_soc_component_write(component, LADC_VOL, DEFAULT_GAIN);
1561 snd_soc_component_write(component, RADC_VOL, DEFAULT_GAIN);
1563 snd_soc_component_write(component, LINE1L_2_LADC_CTRL, 0x0);
1564 snd_soc_component_write(component, LINE1R_2_RADC_CTRL, 0x0);
1567 snd_soc_component_write(component, PGAL_2_HPLOUT_VOL, DEFAULT_VOL);
1568 snd_soc_component_write(component, PGAR_2_HPROUT_VOL, DEFAULT_VOL);
1569 snd_soc_component_write(component, PGAL_2_HPLCOM_VOL, DEFAULT_VOL);
1570 snd_soc_component_write(component, PGAR_2_HPRCOM_VOL, DEFAULT_VOL);
1572 snd_soc_component_write(component, PGAL_2_LLOPM_VOL, DEFAULT_VOL);
1573 snd_soc_component_write(component, PGAR_2_RLOPM_VOL, DEFAULT_VOL);
1578 snd_soc_component_write(component, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL);
1579 snd_soc_component_write(component, LINE2R_2_HPROUT_VOL, DEFAULT_VOL);
1580 snd_soc_component_write(component, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL);
1581 snd_soc_component_write(component, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL);
1583 snd_soc_component_write(component, LINE2L_2_LLOPM_VOL, DEFAULT_VOL);
1584 snd_soc_component_write(component, LINE2R_2_RLOPM_VOL, DEFAULT_VOL);
1590 aic3x_mono_init(component);
1593 snd_soc_component_write(component, CLASSD_CTRL, 0);
1598 snd_soc_component_update_bits(component, HPOUT_SC, HPOUT_SC_OCMV_MASK,
1617 static int aic3x_probe(struct snd_soc_component *component)
1619 struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);
1622 aic3x->component = component;
1631 dev_err(component->dev,
1639 aic3x_init(component);
1644 snd_soc_component_write(component, AIC3X_GPIO1_REG,
1646 snd_soc_component_write(component, AIC3X_GPIO2_REG,
1649 dev_warn(component->dev, "GPIO functionality is not supported on tlv320aic3104\n");
1656 snd_soc_add_component_controls(component, aic3x_extra_snd_controls,
1658 snd_soc_add_component_controls(component, aic3x_mono_controls,
1662 snd_soc_add_component_controls(component, aic3x_extra_snd_controls,
1664 snd_soc_add_component_controls(component,
1676 snd_soc_component_update_bits(component, MICBIAS_CTRL,
1689 aic3x_add_widgets(component);