Lines Matching refs:component
38 struct snd_soc_component *component; member
338 static void rt274_index_sync(struct snd_soc_component *component) in rt274_index_sync() argument
340 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_index_sync()
344 snd_soc_component_write(component, rt274->index_cache[i].reg, in rt274_index_sync()
358 if (!rt274->component) in rt274_jack_detect()
400 static int rt274_mic_detect(struct snd_soc_component *component, in rt274_mic_detect() argument
403 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_mic_detect()
617 struct snd_soc_component *component = dai->component; in rt274_hw_params() local
618 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_hw_params()
628 dev_err(component->dev, "Unsupported sample rate %d\n", in rt274_hw_params()
636 dev_err(component->dev, "Sys_clk is not matched (%d %d)\n", in rt274_hw_params()
644 dev_err(component->dev, "Sys_clk is not matched (%d %d)\n", in rt274_hw_params()
655 dev_err(component->dev, "Unsupported channels %d\n", in rt274_hw_params()
693 snd_soc_component_update_bits(component, in rt274_hw_params()
695 dev_dbg(component->dev, "format val = 0x%x\n", val); in rt274_hw_params()
697 snd_soc_component_update_bits(component, RT274_DAC_FORMAT, 0x407f, val); in rt274_hw_params()
698 snd_soc_component_update_bits(component, RT274_ADC_FORMAT, 0x407f, val); in rt274_hw_params()
705 struct snd_soc_component *component = dai->component; in rt274_set_dai_fmt() local
706 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_set_dai_fmt()
710 snd_soc_component_update_bits(component, in rt274_set_dai_fmt()
715 snd_soc_component_update_bits(component, in rt274_set_dai_fmt()
725 snd_soc_component_update_bits(component, RT274_I2S_CTRL1, in rt274_set_dai_fmt()
729 snd_soc_component_update_bits(component, RT274_I2S_CTRL1, in rt274_set_dai_fmt()
733 snd_soc_component_update_bits(component, RT274_I2S_CTRL1, in rt274_set_dai_fmt()
737 snd_soc_component_update_bits(component, RT274_I2S_CTRL1, in rt274_set_dai_fmt()
744 snd_soc_component_update_bits(component, RT274_DAC_FORMAT, 0x8000, 0); in rt274_set_dai_fmt()
745 snd_soc_component_update_bits(component, RT274_ADC_FORMAT, 0x8000, 0); in rt274_set_dai_fmt()
753 struct snd_soc_component *component = dai->component; in rt274_set_dai_pll() local
754 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_set_dai_pll()
758 snd_soc_component_update_bits(component, RT274_PLL2_CTRL, in rt274_set_dai_pll()
762 dev_warn(component->dev, "invalid pll source, use BCLK\n"); in rt274_set_dai_pll()
765 snd_soc_component_update_bits(component, RT274_PLL2_CTRL, in rt274_set_dai_pll()
771 snd_soc_component_update_bits(component, RT274_MCLK_CTRL, in rt274_set_dai_pll()
775 snd_soc_component_write(component, 0x7a, 0xaab6); in rt274_set_dai_pll()
776 snd_soc_component_write(component, 0x7b, 0x0301); in rt274_set_dai_pll()
777 snd_soc_component_write(component, 0x7c, 0x04fe); in rt274_set_dai_pll()
780 snd_soc_component_write(component, 0x7a, 0xaa96); in rt274_set_dai_pll()
781 snd_soc_component_write(component, 0x7b, 0x8003); in rt274_set_dai_pll()
782 snd_soc_component_write(component, 0x7c, 0x081e); in rt274_set_dai_pll()
785 snd_soc_component_write(component, 0x7a, 0xaa96); in rt274_set_dai_pll()
786 snd_soc_component_write(component, 0x7b, 0x8003); in rt274_set_dai_pll()
787 snd_soc_component_write(component, 0x7c, 0x080e); in rt274_set_dai_pll()
790 dev_warn(component->dev, "invalid freq_in, assume 4.8M\n"); in rt274_set_dai_pll()
793 snd_soc_component_write(component, 0x7a, 0xaab6); in rt274_set_dai_pll()
794 snd_soc_component_write(component, 0x7b, 0x0301); in rt274_set_dai_pll()
795 snd_soc_component_write(component, 0x7c, 0x047e); in rt274_set_dai_pll()
806 struct snd_soc_component *component = dai->component; in rt274_set_dai_sysclk() local
807 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_set_dai_sysclk()
810 dev_dbg(component->dev, "%s freq=%d\n", __func__, freq); in rt274_set_dai_sysclk()
828 dev_warn(component->dev, "invalid sysclk source, use PLL1\n"); in rt274_set_dai_sysclk()
831 snd_soc_component_update_bits(component, RT274_MCLK_CTRL, in rt274_set_dai_sysclk()
833 snd_soc_component_update_bits(component, RT274_CLK_CTRL, in rt274_set_dai_sysclk()
839 dev_err(component->dev, "Should not use MCLK\n"); in rt274_set_dai_sysclk()
842 snd_soc_component_update_bits(component, in rt274_set_dai_sysclk()
847 dev_err(component->dev, "Should not use MCLK\n"); in rt274_set_dai_sysclk()
850 snd_soc_component_update_bits(component, in rt274_set_dai_sysclk()
855 snd_soc_component_update_bits(component, in rt274_set_dai_sysclk()
860 snd_soc_component_update_bits(component, in rt274_set_dai_sysclk()
864 dev_err(component->dev, "Unsupported system clock\n"); in rt274_set_dai_sysclk()
876 struct snd_soc_component *component = dai->component; in rt274_set_bclk_ratio() local
877 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_set_bclk_ratio()
879 dev_dbg(component->dev, "%s ratio=%d\n", __func__, ratio); in rt274_set_bclk_ratio()
882 snd_soc_component_update_bits(component, in rt274_set_bclk_ratio()
885 snd_soc_component_update_bits(component, in rt274_set_bclk_ratio()
896 struct snd_soc_component *component = dai->component; in rt274_set_tdm_slot() local
899 snd_soc_component_update_bits(component, in rt274_set_tdm_slot()
902 snd_soc_component_update_bits(component, in rt274_set_tdm_slot()
909 snd_soc_component_update_bits(component, in rt274_set_tdm_slot()
913 snd_soc_component_update_bits(component, in rt274_set_tdm_slot()
917 dev_err(component->dev, in rt274_set_tdm_slot()
925 static int rt274_set_bias_level(struct snd_soc_component *component, in rt274_set_bias_level() argument
931 snd_soc_component_get_bias_level(component)) { in rt274_set_bias_level()
932 snd_soc_component_write(component, in rt274_set_bias_level()
938 snd_soc_component_write(component, in rt274_set_bias_level()
978 static int rt274_probe(struct snd_soc_component *component) in rt274_probe() argument
980 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_probe()
982 rt274->component = component; in rt274_probe()
991 static void rt274_remove(struct snd_soc_component *component) in rt274_remove() argument
993 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_remove()
996 rt274->component = NULL; in rt274_remove()
1000 static int rt274_suspend(struct snd_soc_component *component) in rt274_suspend() argument
1002 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_suspend()
1010 static int rt274_resume(struct snd_soc_component *component) in rt274_resume() argument
1012 struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component); in rt274_resume()
1015 rt274_index_sync(component); in rt274_resume()