Lines Matching refs:component
283 dev_err(max98090->component->dev, in max98090_reset()
350 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in max98090_get_enab_tlv() local
351 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_get_enab_tlv()
355 unsigned int val = snd_soc_component_read(component, mc->reg); in max98090_get_enab_tlv()
390 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in max98090_put_enab_tlv() local
391 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_put_enab_tlv()
397 unsigned int val = snd_soc_component_read(component, mc->reg); in max98090_put_enab_tlv()
432 snd_soc_component_update_bits(component, mc->reg, in max98090_put_enab_tlv()
736 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in max98090_micinput_event() local
737 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_micinput_event()
739 unsigned int val = snd_soc_component_read(component, w->reg); in max98090_micinput_event()
771 snd_soc_component_update_bits(component, w->reg, M98090_MIC_PA1EN_MASK, in max98090_micinput_event()
774 snd_soc_component_update_bits(component, w->reg, M98090_MIC_PA2EN_MASK, in max98090_micinput_event()
783 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in max98090_shdn_event() local
784 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_shdn_event()
1432 static int max98090_add_widgets(struct snd_soc_component *component) in max98090_add_widgets() argument
1434 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_add_widgets()
1435 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in max98090_add_widgets()
1437 snd_soc_add_component_controls(component, max98090_snd_controls, in max98090_add_widgets()
1441 snd_soc_add_component_controls(component, max98091_snd_controls, in max98090_add_widgets()
1488 static void max98090_configure_bclk(struct snd_soc_component *component) in max98090_configure_bclk() argument
1490 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_configure_bclk()
1495 dev_err(component->dev, "No SYSCLK configured\n"); in max98090_configure_bclk()
1500 dev_err(component->dev, "No audio clocks configured\n"); in max98090_configure_bclk()
1505 if (!(snd_soc_component_read(component, M98090_REG_MASTER_MODE) & in max98090_configure_bclk()
1514 dev_dbg(component->dev, in max98090_configure_bclk()
1518 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1521 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1531 dev_dbg(component->dev, in max98090_configure_bclk()
1533 dev_dbg(component->dev, "i %d ni %lld mi %lld\n", in max98090_configure_bclk()
1536 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1538 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1542 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_NI_MSB, in max98090_configure_bclk()
1544 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_NI_LSB, in max98090_configure_bclk()
1546 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_MI_MSB, in max98090_configure_bclk()
1548 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_MI_LSB, in max98090_configure_bclk()
1558 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1560 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_configure_bclk()
1571 dev_info(component->dev, "No better method found\n"); in max98090_configure_bclk()
1572 dev_info(component->dev, "Calculating ni %lld with mi 65536\n", ni); in max98090_configure_bclk()
1573 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_NI_MSB, in max98090_configure_bclk()
1575 snd_soc_component_write(component, M98090_REG_CLOCK_RATIO_NI_LSB, ni & 0xFF); in max98090_configure_bclk()
1581 struct snd_soc_component *component = codec_dai->component; in max98090_dai_set_fmt() local
1582 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_dai_set_fmt()
1597 snd_soc_component_write(component, in max98090_dai_set_fmt()
1599 snd_soc_component_write(component, in max98090_dai_set_fmt()
1601 snd_soc_component_update_bits(component, M98090_REG_CLOCK_MODE, in max98090_dai_set_fmt()
1623 dev_err(component->dev, "DAI clock mode unsupported"); in max98090_dai_set_fmt()
1626 snd_soc_component_write(component, M98090_REG_MASTER_MODE, regval); in max98090_dai_set_fmt()
1642 dev_err(component->dev, "DAI format unsupported"); in max98090_dai_set_fmt()
1659 dev_err(component->dev, "DAI invert mode unsupported"); in max98090_dai_set_fmt()
1672 snd_soc_component_write(component, in max98090_dai_set_fmt()
1681 snd_soc_component_write(component, M98090_REG_TDM_FORMAT, regval); in max98090_dai_set_fmt()
1682 snd_soc_component_write(component, M98090_REG_TDM_CONTROL, tdm_regval); in max98090_dai_set_fmt()
1691 struct snd_soc_component *component = codec_dai->component; in max98090_set_tdm_slot() local
1692 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_set_tdm_slot()
1713 static int max98090_set_bias_level(struct snd_soc_component *component, in max98090_set_bias_level() argument
1716 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_set_bias_level()
1734 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON) { in max98090_set_bias_level()
1744 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in max98090_set_bias_level()
1747 dev_err(component->dev, in max98090_set_bias_level()
1756 snd_soc_component_update_bits(component, M98090_REG_JACK_DETECT, in max98090_set_bias_level()
1916 struct snd_soc_component *component = dai->component; in max98090_dai_startup() local
1917 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_dai_startup()
1932 struct snd_soc_component *component = dai->component; in max98090_dai_hw_params() local
1933 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_dai_hw_params()
1945 snd_soc_component_update_bits(component, M98090_REG_INTERFACE_FORMAT, in max98090_dai_hw_params()
1953 max98090_configure_bclk(component); in max98090_dai_hw_params()
1959 snd_soc_component_update_bits(component, M98090_REG_FILTER_CONFIG, in max98090_dai_hw_params()
1962 snd_soc_component_update_bits(component, M98090_REG_FILTER_CONFIG, in max98090_dai_hw_params()
1967 snd_soc_component_update_bits(component, M98090_REG_FILTER_CONFIG, in max98090_dai_hw_params()
1970 snd_soc_component_update_bits(component, M98090_REG_FILTER_CONFIG, in max98090_dai_hw_params()
1985 struct snd_soc_component *component = dai->component; in max98090_dai_set_sysclk() local
1986 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_dai_set_sysclk()
2003 snd_soc_component_write(component, M98090_REG_SYSTEM_CLOCK, in max98090_dai_set_sysclk()
2007 snd_soc_component_write(component, M98090_REG_SYSTEM_CLOCK, in max98090_dai_set_sysclk()
2011 snd_soc_component_write(component, M98090_REG_SYSTEM_CLOCK, in max98090_dai_set_sysclk()
2015 dev_err(component->dev, "Invalid master clock frequency\n"); in max98090_dai_set_sysclk()
2027 struct snd_soc_component *component = codec_dai->component; in max98090_dai_mute() local
2031 snd_soc_component_update_bits(component, M98090_REG_DAI_PLAYBACK_LEVEL, in max98090_dai_mute()
2040 struct snd_soc_component *component = dai->component; in max98090_dai_trigger() local
2041 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_dai_trigger()
2070 struct snd_soc_component *component = max98090->component; in max98090_pll_det_enable_work() local
2093 snd_soc_component_update_bits(component, M98090_REG_INTERRUPT_S, in max98090_pll_det_enable_work()
2102 struct snd_soc_component *component = max98090->component; in max98090_pll_det_disable_work() local
2107 snd_soc_component_update_bits(component, M98090_REG_INTERRUPT_S, in max98090_pll_det_disable_work()
2113 struct snd_soc_component *component = max98090->component; in max98090_pll_work() local
2117 if (!snd_soc_component_active(component)) in max98090_pll_work()
2120 dev_info_ratelimited(component->dev, "PLL unlocked\n"); in max98090_pll_work()
2130 snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN, in max98090_pll_work()
2132 snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN, in max98090_pll_work()
2141 component, M98090_REG_DEVICE_STATUS); in max98090_pll_work()
2152 struct snd_soc_component *component = max98090->component; in max98090_jack_work() local
2160 snd_soc_component_update_bits(component, M98090_REG_JACK_DETECT, in max98090_jack_work()
2165 snd_soc_component_read(component, M98090_REG_JACK_STATUS); in max98090_jack_work()
2168 snd_soc_component_update_bits(component, M98090_REG_JACK_DETECT, in max98090_jack_work()
2172 reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS); in max98090_jack_work()
2176 dev_dbg(component->dev, "No Headset Detected\n"); in max98090_jack_work()
2188 dev_dbg(component->dev, in max98090_jack_work()
2205 dev_dbg(component->dev, "Headphone Detected\n"); in max98090_jack_work()
2214 dev_dbg(component->dev, "Headset Detected\n"); in max98090_jack_work()
2223 dev_dbg(component->dev, "Unrecognized Jack Status\n"); in max98090_jack_work()
2234 struct snd_soc_component *component = max98090->component; in max98090_interrupt() local
2240 if (component == NULL) in max98090_interrupt()
2243 dev_dbg(component->dev, "***** max98090_interrupt *****\n"); in max98090_interrupt()
2248 dev_err(component->dev, in max98090_interrupt()
2257 dev_err(component->dev, in max98090_interrupt()
2263 dev_dbg(component->dev, "active=0x%02x mask=0x%02x -> active=0x%02x\n", in max98090_interrupt()
2272 dev_err(component->dev, "M98090_CLD_MASK\n"); in max98090_interrupt()
2275 dev_dbg(component->dev, "M98090_SLD_MASK\n"); in max98090_interrupt()
2278 dev_dbg(component->dev, "M98090_ULK_MASK\n"); in max98090_interrupt()
2283 dev_dbg(component->dev, "M98090_JDET_MASK\n"); in max98090_interrupt()
2285 pm_wakeup_event(component->dev, 100); in max98090_interrupt()
2293 dev_dbg(component->dev, "M98090_DRCACT_MASK\n"); in max98090_interrupt()
2296 dev_err(component->dev, "M98090_DRCCLP_MASK\n"); in max98090_interrupt()
2314 int max98090_mic_detect(struct snd_soc_component *component, in max98090_mic_detect() argument
2317 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_mic_detect()
2319 dev_dbg(component->dev, "max98090_mic_detect\n"); in max98090_mic_detect()
2323 snd_soc_component_update_bits(component, M98090_REG_INTERRUPT_S, in max98090_mic_detect()
2327 snd_soc_component_update_bits(component, M98090_REG_INTERRUPT_S, in max98090_mic_detect()
2377 static int max98090_probe(struct snd_soc_component *component) in max98090_probe() argument
2379 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_probe()
2386 dev_dbg(component->dev, "max98090_probe\n"); in max98090_probe()
2388 max98090->mclk = devm_clk_get(component->dev, "mclk"); in max98090_probe()
2392 max98090->component = component; in max98090_probe()
2414 ret = snd_soc_component_read(component, M98090_REG_REVISION_ID); in max98090_probe()
2416 dev_err(component->dev, "Failed to read device revision: %d\n", in max98090_probe()
2423 dev_info(component->dev, "MAX98090 REVID=0x%02x\n", ret); in max98090_probe()
2426 dev_info(component->dev, "MAX98091 REVID=0x%02x\n", ret); in max98090_probe()
2429 dev_err(component->dev, "Unrecognized revision 0x%02x\n", ret); in max98090_probe()
2433 dev_warn(component->dev, "Mismatch in DT specified CODEC type.\n"); in max98090_probe()
2446 snd_soc_component_write(component, M98090_REG_JACK_DETECT, in max98090_probe()
2454 snd_soc_component_read(component, M98090_REG_DEVICE_STATUS); in max98090_probe()
2457 snd_soc_component_update_bits(component, M98090_REG_DAC_CONTROL, in max98090_probe()
2460 snd_soc_component_update_bits(component, M98090_REG_DAC_CONTROL, in max98090_probe()
2463 snd_soc_component_update_bits(component, M98090_REG_ADC_CONTROL, in max98090_probe()
2468 snd_soc_component_write(component, M98090_REG_BIAS_CONTROL, in max98090_probe()
2471 err = device_property_read_u32(component->dev, "maxim,micbias", &micbias); in max98090_probe()
2474 dev_info(component->dev, "use default 2.8v micbias\n"); in max98090_probe()
2476 dev_err(component->dev, "micbias out of range 0x%x\n", micbias); in max98090_probe()
2480 snd_soc_component_update_bits(component, M98090_REG_MIC_BIAS_VOLTAGE, in max98090_probe()
2483 max98090_add_widgets(component); in max98090_probe()
2489 static void max98090_remove(struct snd_soc_component *component) in max98090_remove() argument
2491 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_remove()
2496 max98090->component = NULL; in max98090_remove()
2499 static void max98090_seq_notifier(struct snd_soc_component *component, in max98090_seq_notifier() argument
2502 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); in max98090_seq_notifier()
2505 snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN, in max98090_seq_notifier()
2508 snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN, in max98090_seq_notifier()