Lines Matching refs:component
43 struct snd_soc_component *component; member
816 int rt5668_sel_asrc_clk_src(struct snd_soc_component *component, in rt5668_sel_asrc_clk_src() argument
831 snd_soc_component_update_bits(component, RT5668_PLL_TRACK_2, in rt5668_sel_asrc_clk_src()
837 snd_soc_component_update_bits(component, RT5668_PLL_TRACK_3, in rt5668_sel_asrc_clk_src()
846 static int rt5668_button_detect(struct snd_soc_component *component) in rt5668_button_detect() argument
850 val = snd_soc_component_read(component, RT5668_4BTN_IL_CMD_1); in rt5668_button_detect()
852 snd_soc_component_write(component, RT5668_4BTN_IL_CMD_1, val); in rt5668_button_detect()
858 static void rt5668_enable_push_button_irq(struct snd_soc_component *component, in rt5668_enable_push_button_irq() argument
862 snd_soc_component_update_bits(component, RT5668_SAR_IL_CMD_1, in rt5668_enable_push_button_irq()
864 snd_soc_component_update_bits(component, RT5668_SAR_IL_CMD_13, in rt5668_enable_push_button_irq()
866 snd_soc_component_write(component, RT5668_IL_CMD_1, 0x0040); in rt5668_enable_push_button_irq()
867 snd_soc_component_update_bits(component, RT5668_4BTN_IL_CMD_2, in rt5668_enable_push_button_irq()
870 snd_soc_component_update_bits(component, RT5668_IRQ_CTRL_3, in rt5668_enable_push_button_irq()
873 snd_soc_component_update_bits(component, RT5668_IRQ_CTRL_3, in rt5668_enable_push_button_irq()
875 snd_soc_component_update_bits(component, RT5668_SAR_IL_CMD_1, in rt5668_enable_push_button_irq()
877 snd_soc_component_update_bits(component, RT5668_4BTN_IL_CMD_2, in rt5668_enable_push_button_irq()
879 snd_soc_component_update_bits(component, RT5668_4BTN_IL_CMD_2, in rt5668_enable_push_button_irq()
881 snd_soc_component_update_bits(component, RT5668_SAR_IL_CMD_13, in rt5668_enable_push_button_irq()
895 static int rt5668_headset_detect(struct snd_soc_component *component, in rt5668_headset_detect() argument
898 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_headset_detect()
900 snd_soc_component_get_dapm(component); in rt5668_headset_detect()
906 snd_soc_component_update_bits(component, RT5668_CBJ_CTRL_1, in rt5668_headset_detect()
910 val = snd_soc_component_read(component, RT5668_CBJ_CTRL_2) in rt5668_headset_detect()
914 val = snd_soc_component_read(component, in rt5668_headset_detect()
923 rt5668_enable_push_button_irq(component, true); in rt5668_headset_detect()
930 rt5668_enable_push_button_irq(component, false); in rt5668_headset_detect()
931 snd_soc_component_update_bits(component, RT5668_CBJ_CTRL_1, in rt5668_headset_detect()
939 dev_dbg(component->dev, "jack_type = %d\n", rt5668->jack_type); in rt5668_headset_detect()
958 if (snd_soc_component_read(rt5668->component, RT5668_AJD1_CTRL) in rt5668_jd_check_handler()
961 rt5668->jack_type = rt5668_headset_detect(rt5668->component, 0); in rt5668_jd_check_handler()
972 static int rt5668_set_jack_detect(struct snd_soc_component *component, in rt5668_set_jack_detect() argument
975 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_jack_detect()
979 snd_soc_component_update_bits(component, RT5668_CBJ_CTRL_2, in rt5668_set_jack_detect()
981 snd_soc_component_write(component, RT5668_CBJ_CTRL_1, 0xd002); in rt5668_set_jack_detect()
982 snd_soc_component_update_bits(component, RT5668_CBJ_CTRL_3, in rt5668_set_jack_detect()
984 snd_soc_component_update_bits(component, RT5668_SAR_IL_CMD_1, in rt5668_set_jack_detect()
1010 dev_warn(component->dev, "Wrong JD source\n"); in rt5668_set_jack_detect()
1025 if (!rt5668->component || in rt5668_jack_detect_handler()
1026 !snd_soc_card_is_instantiated(rt5668->component->card)) { in rt5668_jack_detect_handler()
1035 val = snd_soc_component_read(rt5668->component, RT5668_AJD1_CTRL) in rt5668_jack_detect_handler()
1042 rt5668_headset_detect(rt5668->component, 1); in rt5668_jack_detect_handler()
1046 btn_type = rt5668_button_detect(rt5668->component); in rt5668_jack_detect_handler()
1079 dev_err(rt5668->component->dev, in rt5668_jack_detect_handler()
1087 rt5668->jack_type = rt5668_headset_detect(rt5668->component, 0); in rt5668_jack_detect_handler()
1173 struct snd_soc_component *component = in set_dmic_clk() local
1175 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in set_dmic_clk()
1181 snd_soc_component_update_bits(component, RT5668_DMIC_CTRL_1, in set_dmic_clk()
1190 struct snd_soc_component *component = in set_filter_clk() local
1192 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in set_filter_clk()
1196 val = snd_soc_component_read(component, RT5668_GPIO_CTRL_1) & in set_filter_clk()
1211 snd_soc_component_update_bits(component, reg, in set_filter_clk()
1221 struct snd_soc_component *component = in is_sys_clk_from_pll1() local
1224 val = snd_soc_component_read(component, RT5668_GLB_CLK); in is_sys_clk_from_pll1()
1236 struct snd_soc_component *component = in is_using_asrc() local
1252 val = (snd_soc_component_read(component, reg) >> shift) & 0xf; in is_using_asrc()
1422 struct snd_soc_component *component = in rt5668_hp_event() local
1427 snd_soc_component_write(component, in rt5668_hp_event()
1429 snd_soc_component_write(component, in rt5668_hp_event()
1431 snd_soc_component_update_bits(component, RT5668_STO_NG2_CTRL_1, in rt5668_hp_event()
1433 snd_soc_component_update_bits(component, in rt5668_hp_event()
1438 snd_soc_component_update_bits(component, in rt5668_hp_event()
1440 snd_soc_component_write(component, in rt5668_hp_event()
1471 struct snd_soc_component *component = in rt5655_set_verf() local
1478 snd_soc_component_update_bits(component, in rt5655_set_verf()
1483 snd_soc_component_update_bits(component, in rt5655_set_verf()
1496 snd_soc_component_update_bits(component, in rt5655_set_verf()
1502 snd_soc_component_update_bits(component, in rt5655_set_verf()
1870 struct snd_soc_component *component = dai->component; in rt5668_set_tdm_slot() local
1892 snd_soc_component_update_bits(component, RT5668_TDM_CTRL, in rt5668_set_tdm_slot()
1912 snd_soc_component_update_bits(component, RT5668_TDM_TCON_CTRL, in rt5668_set_tdm_slot()
1922 struct snd_soc_component *component = dai->component; in rt5668_hw_params() local
1923 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_hw_params()
1932 dev_err(component->dev, "Unsupported frame size: %d\n", in rt5668_hw_params()
1965 snd_soc_component_update_bits(component, RT5668_I2S1_SDP, in rt5668_hw_params()
1968 snd_soc_component_update_bits(component, in rt5668_hw_params()
1973 snd_soc_component_update_bits(component, in rt5668_hw_params()
1977 snd_soc_component_update_bits(component, in rt5668_hw_params()
1982 snd_soc_component_update_bits(component, RT5668_I2S2_SDP, in rt5668_hw_params()
1985 snd_soc_component_update_bits(component, in rt5668_hw_params()
1990 snd_soc_component_update_bits(component, in rt5668_hw_params()
1994 snd_soc_component_update_bits(component, in rt5668_hw_params()
1999 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5668_hw_params()
2008 struct snd_soc_component *component = dai->component; in rt5668_set_dai_fmt() local
2009 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_dai_fmt()
2068 snd_soc_component_update_bits(component, RT5668_I2S1_SDP, in rt5668_set_dai_fmt()
2070 snd_soc_component_update_bits(component, RT5668_TDM_TCON_CTRL, in rt5668_set_dai_fmt()
2079 snd_soc_component_update_bits(component, RT5668_I2S2_SDP, in rt5668_set_dai_fmt()
2084 dev_err(component->dev, "Invalid dai->id: %d\n", dai->id); in rt5668_set_dai_fmt()
2090 static int rt5668_set_component_sysclk(struct snd_soc_component *component, in rt5668_set_component_sysclk() argument
2093 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_component_sysclk()
2117 dev_err(component->dev, "Invalid clock id (%d)\n", clk_id); in rt5668_set_component_sysclk()
2120 snd_soc_component_update_bits(component, RT5668_GLB_CLK, in rt5668_set_component_sysclk()
2124 snd_soc_component_update_bits(component, in rt5668_set_component_sysclk()
2132 dev_dbg(component->dev, "Sysclk is %dHz and clock id is %d\n", in rt5668_set_component_sysclk()
2138 static int rt5668_set_component_pll(struct snd_soc_component *component, in rt5668_set_component_pll() argument
2142 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_component_pll()
2151 dev_dbg(component->dev, "PLL disabled\n"); in rt5668_set_component_pll()
2155 snd_soc_component_update_bits(component, RT5668_GLB_CLK, in rt5668_set_component_pll()
2162 snd_soc_component_update_bits(component, RT5668_GLB_CLK, in rt5668_set_component_pll()
2166 snd_soc_component_update_bits(component, RT5668_GLB_CLK, in rt5668_set_component_pll()
2170 dev_err(component->dev, "Unknown PLL Source %d\n", source); in rt5668_set_component_pll()
2176 dev_err(component->dev, "Unsupported input clock %d\n", freq_in); in rt5668_set_component_pll()
2180 dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n", in rt5668_set_component_pll()
2184 snd_soc_component_write(component, RT5668_PLL_CTRL_1, in rt5668_set_component_pll()
2186 snd_soc_component_write(component, RT5668_PLL_CTRL_2, in rt5668_set_component_pll()
2199 struct snd_soc_component *component = dai->component; in rt5668_set_bclk_ratio() local
2200 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_bclk_ratio()
2206 snd_soc_component_update_bits(component, RT5668_ADDA_CLK_2, in rt5668_set_bclk_ratio()
2211 snd_soc_component_update_bits(component, RT5668_ADDA_CLK_2, in rt5668_set_bclk_ratio()
2223 static int rt5668_set_bias_level(struct snd_soc_component *component, in rt5668_set_bias_level() argument
2226 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_set_bias_level()
2258 static int rt5668_probe(struct snd_soc_component *component) in rt5668_probe() argument
2260 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_probe()
2262 rt5668->component = component; in rt5668_probe()
2267 static void rt5668_remove(struct snd_soc_component *component) in rt5668_remove() argument
2269 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_remove()
2275 static int rt5668_suspend(struct snd_soc_component *component) in rt5668_suspend() argument
2277 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_suspend()
2284 static int rt5668_resume(struct snd_soc_component *component) in rt5668_resume() argument
2286 struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); in rt5668_resume()