Lines Matching refs:component

385 	struct snd_soc_component *component;  member
485 static void wm8995_update_class_w(struct snd_soc_component *component) in wm8995_update_class_w() argument
492 reg = snd_soc_component_read(component, WM8995_DAC1_LEFT_MIXER_ROUTING); in wm8995_update_class_w()
495 dev_dbg(component->dev, "Class W source AIF2DAC\n"); in wm8995_update_class_w()
499 dev_dbg(component->dev, "Class W source AIF1DAC2\n"); in wm8995_update_class_w()
503 dev_dbg(component->dev, "Class W source AIF1DAC1\n"); in wm8995_update_class_w()
507 dev_dbg(component->dev, "DAC mixer setting: %x\n", reg); in wm8995_update_class_w()
512 reg_r = snd_soc_component_read(component, WM8995_DAC1_RIGHT_MIXER_ROUTING); in wm8995_update_class_w()
514 dev_dbg(component->dev, "Left and right DAC mixers different\n"); in wm8995_update_class_w()
519 dev_dbg(component->dev, "Class W enabled\n"); in wm8995_update_class_w()
520 snd_soc_component_update_bits(component, WM8995_CLASS_W_1, in wm8995_update_class_w()
525 dev_dbg(component->dev, "Class W disabled\n"); in wm8995_update_class_w()
526 snd_soc_component_update_bits(component, WM8995_CLASS_W_1, in wm8995_update_class_w()
534 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in check_clk_sys() local
538 reg = snd_soc_component_read(component, WM8995_CLOCKING_1); in check_clk_sys()
550 struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol); in wm8995_put_class_w() local
554 wm8995_update_class_w(component); in wm8995_put_class_w()
561 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in hp_supply_event() local
566 snd_soc_component_update_bits(component, WM8995_POWER_MANAGEMENT_1, in hp_supply_event()
573 snd_soc_component_update_bits(component, WM8995_ANALOGUE_HP_1, in hp_supply_event()
580 snd_soc_component_update_bits(component, WM8995_CHARGE_PUMP_1, in hp_supply_event()
588 static void dc_servo_cmd(struct snd_soc_component *component, in dc_servo_cmd() argument
593 dev_dbg(component->dev, "%s: reg = %#x, val = %#x, mask = %#x\n", in dc_servo_cmd()
596 snd_soc_component_write(component, reg, val); in dc_servo_cmd()
599 val = snd_soc_component_read(component, WM8995_DC_SERVO_READBACK_0); in dc_servo_cmd()
604 dev_err(component->dev, "Timed out waiting for DC Servo\n"); in dc_servo_cmd()
610 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in hp_event() local
613 reg = snd_soc_component_read(component, WM8995_ANALOGUE_HP_1); in hp_event()
617 snd_soc_component_update_bits(component, WM8995_CHARGE_PUMP_1, in hp_event()
622 snd_soc_component_update_bits(component, WM8995_POWER_MANAGEMENT_1, in hp_event()
630 snd_soc_component_write(component, WM8995_ANALOGUE_HP_1, reg); in hp_event()
632 snd_soc_component_write(component, WM8995_DC_SERVO_1, WM8995_DCS_ENA_CHAN_0 | in hp_event()
635 dc_servo_cmd(component, WM8995_DC_SERVO_2, in hp_event()
643 snd_soc_component_write(component, WM8995_ANALOGUE_HP_1, reg); in hp_event()
647 snd_soc_component_update_bits(component, WM8995_ANALOGUE_HP_1, in hp_event()
653 snd_soc_component_update_bits(component, WM8995_ANALOGUE_HP_1, in hp_event()
657 snd_soc_component_write(component, WM8995_DC_SERVO_1, 0); in hp_event()
659 snd_soc_component_update_bits(component, WM8995_POWER_MANAGEMENT_1, in hp_event()
669 static int configure_aif_clock(struct snd_soc_component *component, int aif) in configure_aif_clock() argument
676 wm8995 = snd_soc_component_get_drvdata(component); in configure_aif_clock()
707 dev_dbg(component->dev, "Dividing AIF%d clock to %dHz\n", in configure_aif_clock()
713 snd_soc_component_update_bits(component, WM8995_AIF1_CLOCKING_1 + offset, in configure_aif_clock()
719 static int configure_clock(struct snd_soc_component *component) in configure_clock() argument
721 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in configure_clock()
725 wm8995 = snd_soc_component_get_drvdata(component); in configure_clock()
728 configure_aif_clock(component, 0); in configure_clock()
729 configure_aif_clock(component, 1); in configure_clock()
747 change = snd_soc_component_update_bits(component, WM8995_CLOCKING_1, in configure_clock()
760 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in clk_sys_event() local
764 return configure_clock(component); in clk_sys_event()
767 configure_clock(component); in clk_sys_event()
1422 struct snd_soc_component *component = dai->component; in wm8995_aif_mute() local
1436 snd_soc_component_update_bits(component, mute_reg, WM8995_AIF1DAC1_MUTE_MASK, in wm8995_aif_mute()
1443 struct snd_soc_component *component; in wm8995_set_dai_fmt() local
1447 component = dai->component; in wm8995_set_dai_fmt()
1520 snd_soc_component_update_bits(component, WM8995_AIF1_CONTROL_1, in wm8995_set_dai_fmt()
1524 snd_soc_component_update_bits(component, WM8995_AIF1_MASTER_SLAVE, in wm8995_set_dai_fmt()
1547 struct snd_soc_component *component; in wm8995_hw_params() local
1558 component = dai->component; in wm8995_hw_params()
1559 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_hw_params()
1571 dev_dbg(component->dev, "AIF1 using split LRCLK\n"); in wm8995_hw_params()
1583 dev_dbg(component->dev, "AIF2 using split LRCLK\n"); in wm8995_hw_params()
1669 snd_soc_component_update_bits(component, aif1_reg, in wm8995_hw_params()
1671 snd_soc_component_update_bits(component, bclk_reg, in wm8995_hw_params()
1673 snd_soc_component_update_bits(component, lrclk_reg, in wm8995_hw_params()
1675 snd_soc_component_update_bits(component, rate_reg, in wm8995_hw_params()
1683 struct snd_soc_component *component = codec_dai->component; in wm8995_set_tristate() local
1708 return snd_soc_component_update_bits(component, reg, mask, val); in wm8995_set_tristate()
1798 struct snd_soc_component *component; in wm8995_set_fll() local
1804 component = dai->component; in wm8995_set_fll()
1805 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_fll()
1807 aif1 = snd_soc_component_read(component, WM8995_AIF1_CLOCKING_1) in wm8995_set_fll()
1810 aif2 = snd_soc_component_read(component, WM8995_AIF2_CLOCKING_1) in wm8995_set_fll()
1859 snd_soc_component_update_bits(component, WM8995_AIF1_CLOCKING_1, in wm8995_set_fll()
1861 snd_soc_component_update_bits(component, WM8995_AIF2_CLOCKING_1, in wm8995_set_fll()
1865 snd_soc_component_update_bits(component, WM8995_FLL1_CONTROL_1 + reg_offset, in wm8995_set_fll()
1870 snd_soc_component_update_bits(component, WM8995_FLL1_CONTROL_2 + reg_offset, in wm8995_set_fll()
1874 snd_soc_component_write(component, WM8995_FLL1_CONTROL_3 + reg_offset, fll.k); in wm8995_set_fll()
1876 snd_soc_component_update_bits(component, WM8995_FLL1_CONTROL_4 + reg_offset, in wm8995_set_fll()
1880 snd_soc_component_update_bits(component, WM8995_FLL1_CONTROL_5 + reg_offset, in wm8995_set_fll()
1887 snd_soc_component_update_bits(component, WM8995_FLL1_CONTROL_1 + reg_offset, in wm8995_set_fll()
1895 snd_soc_component_update_bits(component, WM8995_AIF1_CLOCKING_1, in wm8995_set_fll()
1897 snd_soc_component_update_bits(component, WM8995_AIF2_CLOCKING_1, in wm8995_set_fll()
1900 configure_clock(component); in wm8995_set_fll()
1908 struct snd_soc_component *component; in wm8995_set_dai_sysclk() local
1911 component = dai->component; in wm8995_set_dai_sysclk()
1912 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_dai_sysclk()
1950 configure_clock(component); in wm8995_set_dai_sysclk()
1955 static int wm8995_set_bias_level(struct snd_soc_component *component, in wm8995_set_bias_level() argument
1961 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_bias_level()
1967 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in wm8995_set_bias_level()
1975 dev_err(component->dev, in wm8995_set_bias_level()
1980 snd_soc_component_update_bits(component, WM8995_POWER_MANAGEMENT_1, in wm8995_set_bias_level()
1985 snd_soc_component_update_bits(component, WM8995_POWER_MANAGEMENT_1, in wm8995_set_bias_level()
1995 static int wm8995_probe(struct snd_soc_component *component) in wm8995_probe() argument
2001 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_probe()
2002 wm8995->component = component; in wm8995_probe()
2007 ret = devm_regulator_bulk_get(component->dev, in wm8995_probe()
2011 dev_err(component->dev, "Failed to request supplies: %d\n", ret); in wm8995_probe()
2030 dev_err(component->dev, in wm8995_probe()
2039 dev_err(component->dev, "Failed to enable supplies: %d\n", ret); in wm8995_probe()
2043 ret = snd_soc_component_read(component, WM8995_SOFTWARE_RESET); in wm8995_probe()
2045 dev_err(component->dev, "Failed to read device ID: %d\n", ret); in wm8995_probe()
2050 dev_err(component->dev, "Invalid device ID: %#x\n", ret); in wm8995_probe()
2055 ret = snd_soc_component_write(component, WM8995_SOFTWARE_RESET, 0); in wm8995_probe()
2057 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in wm8995_probe()
2062 snd_soc_component_update_bits(component, WM8995_AIF1_DAC1_RIGHT_VOLUME, in wm8995_probe()
2064 snd_soc_component_update_bits(component, WM8995_AIF1_DAC2_RIGHT_VOLUME, in wm8995_probe()
2066 snd_soc_component_update_bits(component, WM8995_AIF2_DAC_RIGHT_VOLUME, in wm8995_probe()
2068 snd_soc_component_update_bits(component, WM8995_AIF1_ADC1_RIGHT_VOLUME, in wm8995_probe()
2070 snd_soc_component_update_bits(component, WM8995_AIF1_ADC2_RIGHT_VOLUME, in wm8995_probe()
2072 snd_soc_component_update_bits(component, WM8995_AIF2_ADC_RIGHT_VOLUME, in wm8995_probe()
2074 snd_soc_component_update_bits(component, WM8995_DAC1_RIGHT_VOLUME, in wm8995_probe()
2076 snd_soc_component_update_bits(component, WM8995_DAC2_RIGHT_VOLUME, in wm8995_probe()
2078 snd_soc_component_update_bits(component, WM8995_RIGHT_LINE_INPUT_1_VOLUME, in wm8995_probe()
2081 wm8995_update_class_w(component); in wm8995_probe()