Lines Matching refs:component
39 struct snd_soc_component *component; member
194 static void rt298_index_sync(struct snd_soc_component *component) in rt298_index_sync() argument
196 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_index_sync()
200 snd_soc_component_write(component, rt298->index_cache[i].reg, in rt298_index_sync()
227 if (!rt298->component) in rt298_jack_detect()
230 dapm = snd_soc_component_get_dapm(rt298->component); in rt298_jack_detect()
329 static int rt298_mic_detect(struct snd_soc_component *component, in rt298_mic_detect() argument
332 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in rt298_mic_detect()
333 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_mic_detect()
364 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in is_mclk_mode() local
365 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in is_mclk_mode()
462 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt298_spk_event() local
466 snd_soc_component_write(component, in rt298_spk_event()
470 snd_soc_component_write(component, in rt298_spk_event()
484 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt298_set_dmic1_event() local
488 snd_soc_component_write(component, RT298_SET_PIN_DMIC1, 0x20); in rt298_set_dmic1_event()
491 snd_soc_component_write(component, RT298_SET_PIN_DMIC1, 0); in rt298_set_dmic1_event()
503 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt298_adc_event() local
510 snd_soc_component_update_bits(component, in rt298_adc_event()
514 if (!(snd_soc_component_read(component, RT298_VAD_CTRL) & 0x200)) { in rt298_adc_event()
518 snd_soc_component_update_bits(component, in rt298_adc_event()
521 snd_soc_component_update_bits(component, in rt298_adc_event()
525 snd_soc_component_update_bits(component, in rt298_adc_event()
528 snd_soc_component_update_bits(component, in rt298_adc_event()
535 snd_soc_component_update_bits(component, in rt298_adc_event()
549 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt298_mic1_event() local
553 snd_soc_component_update_bits(component, in rt298_mic1_event()
555 snd_soc_component_update_bits(component, in rt298_mic1_event()
559 snd_soc_component_update_bits(component, in rt298_mic1_event()
561 snd_soc_component_update_bits(component, in rt298_mic1_event()
749 struct snd_soc_component *component = dai->component; in rt298_hw_params() local
750 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_hw_params()
760 dev_err(component->dev, "Unsupported sample rate %d\n", in rt298_hw_params()
768 dev_err(component->dev, "Sys_clk is not matched (%d %d)\n", in rt298_hw_params()
776 dev_err(component->dev, "Sys_clk is not matched (%d %d)\n", in rt298_hw_params()
787 dev_err(component->dev, "Unsupported channels %d\n", in rt298_hw_params()
818 snd_soc_component_update_bits(component, in rt298_hw_params()
820 dev_dbg(component->dev, "format val = 0x%x\n", val); in rt298_hw_params()
822 snd_soc_component_update_bits(component, RT298_DAC_FORMAT, 0x407f, val); in rt298_hw_params()
823 snd_soc_component_update_bits(component, RT298_ADC_FORMAT, 0x407f, val); in rt298_hw_params()
830 struct snd_soc_component *component = dai->component; in rt298_set_dai_fmt() local
834 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
838 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
847 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
851 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
855 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
859 snd_soc_component_update_bits(component, in rt298_set_dai_fmt()
866 snd_soc_component_update_bits(component, RT298_DAC_FORMAT, 0x8000, 0); in rt298_set_dai_fmt()
867 snd_soc_component_update_bits(component, RT298_ADC_FORMAT, 0x8000, 0); in rt298_set_dai_fmt()
875 struct snd_soc_component *component = dai->component; in rt298_set_dai_sysclk() local
876 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_set_dai_sysclk()
878 dev_dbg(component->dev, "%s freq=%d\n", __func__, freq); in rt298_set_dai_sysclk()
881 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
883 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
886 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
888 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
895 dev_err(component->dev, "Should not use MCLK\n"); in rt298_set_dai_sysclk()
898 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
903 dev_err(component->dev, "Should not use MCLK\n"); in rt298_set_dai_sysclk()
906 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
911 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
913 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
918 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
920 snd_soc_component_update_bits(component, in rt298_set_dai_sysclk()
924 dev_err(component->dev, "Unsupported system clock\n"); in rt298_set_dai_sysclk()
936 struct snd_soc_component *component = dai->component; in rt298_set_bclk_ratio() local
938 dev_dbg(component->dev, "%s ratio=%d\n", __func__, ratio); in rt298_set_bclk_ratio()
940 snd_soc_component_update_bits(component, in rt298_set_bclk_ratio()
943 snd_soc_component_update_bits(component, in rt298_set_bclk_ratio()
950 static int rt298_set_bias_level(struct snd_soc_component *component, in rt298_set_bias_level() argument
956 snd_soc_component_get_bias_level(component)) { in rt298_set_bias_level()
957 snd_soc_component_write(component, in rt298_set_bias_level()
959 snd_soc_component_update_bits(component, 0x0d, 0x200, 0x200); in rt298_set_bias_level()
960 snd_soc_component_update_bits(component, 0x52, 0x80, 0x0); in rt298_set_bias_level()
962 snd_soc_component_update_bits(component, 0x0d, 0x200, 0x0); in rt298_set_bias_level()
963 snd_soc_component_update_bits(component, 0x52, 0x80, 0x80); in rt298_set_bias_level()
968 snd_soc_component_write(component, in rt298_set_bias_level()
1007 static int rt298_probe(struct snd_soc_component *component) in rt298_probe() argument
1009 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_probe()
1011 rt298->component = component; in rt298_probe()
1020 static void rt298_remove(struct snd_soc_component *component) in rt298_remove() argument
1022 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_remove()
1025 rt298->component = NULL; in rt298_remove()
1029 static int rt298_suspend(struct snd_soc_component *component) in rt298_suspend() argument
1031 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_suspend()
1040 static int rt298_resume(struct snd_soc_component *component) in rt298_resume() argument
1042 struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); in rt298_resume()
1045 rt298_index_sync(component); in rt298_resume()