Lines Matching refs:component
237 static int cs43130_pll_config(struct snd_soc_component *component) in cs43130_pll_config() argument
239 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_pll_config()
242 dev_dbg(component->dev, "cs43130->mclk = %u, cs43130->mclk_int = %u\n", in cs43130_pll_config()
287 static int cs43130_set_pll(struct snd_soc_component *component, int pll_id, int source, in cs43130_set_pll() argument
291 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_set_pll()
307 dev_err(component->dev, in cs43130_set_pll()
320 dev_err(component->dev, in cs43130_set_pll()
325 ret = cs43130_pll_config(component); in cs43130_set_pll()
326 dev_dbg(component->dev, "cs43130->pll_bypass = %d", cs43130->pll_bypass); in cs43130_set_pll()
330 static int cs43130_change_clksrc(struct snd_soc_component *component, in cs43130_change_clksrc() argument
334 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_change_clksrc()
350 dev_err(component->dev, "Invalid MCLK INT freq: %u\n", cs43130->mclk_int); in cs43130_change_clksrc()
374 dev_err(component->dev, "Timeout waiting for XTAL_READY interrupt\n"); in cs43130_change_clksrc()
410 dev_err(component->dev, "Timeout waiting for XTAL_READY interrupt\n"); in cs43130_change_clksrc()
426 dev_err(component->dev, "Timeout waiting for PLL_READY interrupt\n"); in cs43130_change_clksrc()
457 dev_err(component->dev, "Invalid MCLK source value\n"); in cs43130_change_clksrc()
775 struct snd_soc_component *component = dai->component; in cs43130_dsd_hw_params() local
776 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_dsd_hw_params()
788 cs43130_set_pll(component, 0, 0, cs43130->mclk, required_clk); in cs43130_dsd_hw_params()
790 cs43130_change_clksrc(component, CS43130_MCLK_SRC_EXT); in cs43130_dsd_hw_params()
792 cs43130_change_clksrc(component, CS43130_MCLK_SRC_PLL); in cs43130_dsd_hw_params()
808 dev_err(component->dev, "Rate(%u) not supported\n", in cs43130_dsd_hw_params()
834 struct snd_soc_component *component = dai->component; in cs43130_hw_params() local
835 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_hw_params()
851 cs43130_set_pll(component, 0, 0, cs43130->mclk, required_clk); in cs43130_hw_params()
853 cs43130_change_clksrc(component, CS43130_MCLK_SRC_EXT); in cs43130_hw_params()
855 cs43130_change_clksrc(component, CS43130_MCLK_SRC_PLL); in cs43130_hw_params()
879 dev_err(component->dev, "Rate(%u) not supported\n", in cs43130_hw_params()
896 dev_err(component->dev, "Invalid DAI (%d)\n", dai->id); in cs43130_hw_params()
920 dev_err(component->dev, "SCLK freq is not set\n"); in cs43130_hw_params()
926 dev_err(component->dev, "Format not supported: SCLK freq is too low\n"); in cs43130_hw_params()
930 dev_dbg(component->dev, in cs43130_hw_params()
934 dev_dbg(component->dev, in cs43130_hw_params()
947 struct snd_soc_component *component = dai->component; in cs43130_hw_free() local
948 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_hw_free()
954 cs43130_change_clksrc(component, CS43130_MCLK_SRC_RCO); in cs43130_hw_free()
1024 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); in cs43130_pcm_ch_put() local
1025 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_pcm_ch_put()
1145 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs43130_dsd_event() local
1146 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_dsd_event()
1193 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs43130_dsd_event()
1202 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs43130_pcm_event() local
1203 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_pcm_event()
1250 dev_err(component->dev, "Invalid event = 0x%x\n", event); in cs43130_pcm_event()
1271 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs43130_dac_event() local
1272 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_dac_event()
1326 dev_err(component->dev, "Invalid DAC event = 0x%x\n", event); in cs43130_dac_event()
1351 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs43130_hpin_event() local
1352 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_hpin_event()
1364 dev_err(component->dev, "Invalid HPIN event = 0x%x\n", event); in cs43130_hpin_event()
1472 struct snd_soc_component *component = codec_dai->component; in cs43130_pcm_set_fmt() local
1473 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_pcm_set_fmt()
1483 dev_err(component->dev, "unsupported mode\n"); in cs43130_pcm_set_fmt()
1501 dev_err(component->dev, in cs43130_pcm_set_fmt()
1506 dev_dbg(component->dev, "dai_id = %d, dai_mode = %u, dai_format = %u\n", in cs43130_pcm_set_fmt()
1516 struct snd_soc_component *component = codec_dai->component; in cs43130_dsd_set_fmt() local
1517 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_dsd_set_fmt()
1527 dev_err(component->dev, "Unsupported DAI format.\n"); in cs43130_dsd_set_fmt()
1531 dev_dbg(component->dev, "dai_mode = 0x%x\n", in cs43130_dsd_set_fmt()
1540 struct snd_soc_component *component = codec_dai->component; in cs43130_set_sysclk() local
1541 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_set_sysclk()
1544 dev_dbg(component->dev, "dai_id = %d, sclk = %u\n", codec_dai->id, in cs43130_set_sysclk()
1628 static int cs43130_component_set_sysclk(struct snd_soc_component *component, in cs43130_component_set_sysclk() argument
1632 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_component_set_sysclk()
1634 dev_dbg(component->dev, "clk_id = %d, source = %d, freq = %d, dir = %d\n", in cs43130_component_set_sysclk()
1643 dev_err(component->dev, "Invalid MCLK INT freq: %u\n", freq); in cs43130_component_set_sysclk()
1650 dev_err(component->dev, "Invalid MCLK source\n"); in cs43130_component_set_sysclk()
1937 struct snd_soc_component *component = cs43130->component; in cs43130_update_hpload() local
1967 dev_dbg(component->dev, "HP DC impedance (Ch %u): %u\n", !left_ch, in cs43130_update_hpload()
1975 dev_dbg(component->dev, "HP AC (%u Hz) impedance (Ch %u): %u\n", in cs43130_update_hpload()
1989 struct snd_soc_component *component = cs43130->component; in cs43130_hpload_proc() local
2012 dev_err(component->dev, "Timeout waiting for HPLOAD interrupt\n"); in cs43130_hpload_proc()
2016 dev_dbg(component->dev, "HP load stat: %x, INT_MASK_4: %x\n", in cs43130_hpload_proc()
2022 dev_dbg(component->dev, "HP load measure failed\n"); in cs43130_hpload_proc()
2064 struct snd_soc_component *component; in cs43130_imp_meas() local
2068 component = cs43130->component; in cs43130_imp_meas()
2078 cs43130_set_pll(component, 0, 0, cs43130->mclk, CS43130_MCLK_22M); in cs43130_imp_meas()
2080 cs43130_change_clksrc(component, CS43130_MCLK_SRC_EXT); in cs43130_imp_meas()
2082 cs43130_change_clksrc(component, CS43130_MCLK_SRC_PLL); in cs43130_imp_meas()
2133 dev_dbg(component->dev, "Set HP output control. DC threshold\n"); in cs43130_imp_meas()
2135 dev_dbg(component->dev, "DC threshold[%d]: %u.\n", i, in cs43130_imp_meas()
2162 cs43130_change_clksrc(component, CS43130_MCLK_SRC_RCO); in cs43130_imp_meas()
2169 struct snd_soc_component *component = cs43130->component; in cs43130_irq_thread() local
2187 dev_dbg(component->dev, "number of interrupts occurred (%u)\n", in cs43130_irq_thread()
2205 dev_err(component->dev, in cs43130_irq_thread()
2214 dev_err(component->dev, "HP unplugged during measurement (%x)\n", in cs43130_irq_thread()
2222 dev_err(component->dev, "HP load out of range (%x)\n", in cs43130_irq_thread()
2230 dev_dbg(component->dev, "HP AC load measurement done (%x)\n", in cs43130_irq_thread()
2238 dev_dbg(component->dev, "HP DC load measurement done (%x)\n", in cs43130_irq_thread()
2246 dev_dbg(component->dev, "HP load state machine on done (%x)\n", in cs43130_irq_thread()
2254 dev_dbg(component->dev, "HP load state machine off done (%x)\n", in cs43130_irq_thread()
2261 dev_err(component->dev, "Crystal err: clock is not running\n"); in cs43130_irq_thread()
2266 dev_dbg(component->dev, "HP unplugged\n"); in cs43130_irq_thread()
2275 dev_dbg(component->dev, "HP load queue work\n"); in cs43130_irq_thread()
2287 static int cs43130_probe(struct snd_soc_component *component) in cs43130_probe() argument
2290 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); in cs43130_probe()
2291 struct snd_soc_card *card = component->card; in cs43130_probe()
2294 cs43130->component = component; in cs43130_probe()
2307 dev_err(component->dev, "Cannot create jack\n"); in cs43130_probe()
2313 ret = sysfs_create_groups(&component->dev->kobj, hpload_groups); in cs43130_probe()
2319 sysfs_remove_groups(&component->dev->kobj, hpload_groups); in cs43130_probe()