Lines Matching full:component

58 	struct snd_soc_component *component;  member
1398 static void rt5663_enable_push_button_irq(struct snd_soc_component *component, in rt5663_enable_push_button_irq() argument
1401 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_enable_push_button_irq()
1404 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1407 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1410 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1415 snd_soc_component_update_bits(component, RT5663_IRQ_3, in rt5663_enable_push_button_irq()
1420 snd_soc_component_update_bits(component, RT5663_IRQ_2, in rt5663_enable_push_button_irq()
1425 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_enable_push_button_irq()
1430 snd_soc_component_update_bits(component, RT5663_IRQ_3, in rt5663_enable_push_button_irq()
1435 snd_soc_component_update_bits(component, RT5663_IRQ_2, in rt5663_enable_push_button_irq()
1440 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_enable_push_button_irq()
1442 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1445 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1448 snd_soc_component_update_bits(component, RT5663_IL_CMD_6, in rt5663_enable_push_button_irq()
1456 * @component: SoC audio component device.
1464 static int rt5663_v2_jack_detect(struct snd_soc_component *component, int jack_insert) in rt5663_v2_jack_detect() argument
1466 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in rt5663_v2_jack_detect()
1467 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_v2_jack_detect()
1470 dev_dbg(component->dev, "%s jack_insert:%d\n", __func__, jack_insert); in rt5663_v2_jack_detect()
1472 snd_soc_component_write(component, RT5663_CBJ_TYPE_2, 0x8040); in rt5663_v2_jack_detect()
1473 snd_soc_component_write(component, RT5663_CBJ_TYPE_3, 0x1484); in rt5663_v2_jack_detect()
1480 snd_soc_component_update_bits(component, RT5663_RC_CLK, in rt5663_v2_jack_detect()
1482 snd_soc_component_update_bits(component, RT5663_RECMIX, 0x8, 0x8); in rt5663_v2_jack_detect()
1486 val = snd_soc_component_read(component, RT5663_CBJ_TYPE_2) & 0x0003; in rt5663_v2_jack_detect()
1489 dev_dbg(component->dev, "%s: MX-0011 val=%x sleep %d\n", in rt5663_v2_jack_detect()
1493 dev_dbg(component->dev, "%s val = %d\n", __func__, val); in rt5663_v2_jack_detect()
1498 rt5663_enable_push_button_irq(component, true); in rt5663_v2_jack_detect()
1510 snd_soc_component_update_bits(component, RT5663_RECMIX, 0x8, 0x0); in rt5663_v2_jack_detect()
1513 rt5663_enable_push_button_irq(component, false); in rt5663_v2_jack_detect()
1523 dev_dbg(component->dev, "jack_type = %d\n", rt5663->jack_type); in rt5663_v2_jack_detect()
1529 * @component: SoC audio component device.
1536 static int rt5663_jack_detect(struct snd_soc_component *component, int jack_insert) in rt5663_jack_detect() argument
1538 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_jack_detect()
1541 dev_dbg(component->dev, "%s jack_insert:%d\n", __func__, jack_insert); in rt5663_jack_detect()
1544 snd_soc_component_update_bits(component, RT5663_DIG_MISC, in rt5663_jack_detect()
1546 snd_soc_component_update_bits(component, RT5663_HP_CHARGE_PUMP_1, in rt5663_jack_detect()
1550 snd_soc_component_update_bits(component, RT5663_DUMMY_1, in rt5663_jack_detect()
1554 snd_soc_component_update_bits(component, RT5663_CBJ_1, in rt5663_jack_detect()
1557 snd_soc_component_update_bits(component, RT5663_IL_CMD_2, in rt5663_jack_detect()
1560 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_2, in rt5663_jack_detect()
1562 snd_soc_component_update_bits(component, RT5663_EM_JACK_TYPE_1, in rt5663_jack_detect()
1566 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_jack_detect()
1570 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_jack_detect()
1575 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_jack_detect()
1578 snd_soc_component_update_bits(component, RT5663_AUTO_1MRC_CLK, in rt5663_jack_detect()
1580 snd_soc_component_update_bits(component, RT5663_IRQ_1, in rt5663_jack_detect()
1582 snd_soc_component_update_bits(component, RT5663_EM_JACK_TYPE_1, in rt5663_jack_detect()
1584 snd_soc_component_update_bits(component, RT5663_EM_JACK_TYPE_1, in rt5663_jack_detect()
1599 val = snd_soc_component_read(component, RT5663_EM_JACK_TYPE_2) & 0x0003; in rt5663_jack_detect()
1600 dev_dbg(component->dev, "%s val = %d\n", __func__, val); in rt5663_jack_detect()
1602 snd_soc_component_update_bits(component, RT5663_HP_CHARGE_PUMP_1, in rt5663_jack_detect()
1610 rt5663_enable_push_button_irq(component, true); in rt5663_jack_detect()
1635 snd_soc_component_update_bits(component, in rt5663_jack_detect()
1661 rt5663_enable_push_button_irq(component, false); in rt5663_jack_detect()
1663 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_jack_detect()
1668 dev_dbg(component->dev, "jack_type = %d\n", rt5663->jack_type); in rt5663_jack_detect()
1672 static int rt5663_impedance_sensing(struct snd_soc_component *component) in rt5663_impedance_sensing() argument
1674 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_impedance_sensing()
1683 snd_soc_component_write(component, RT5663_MIC_DECRO_2, in rt5663_impedance_sensing()
1685 snd_soc_component_write(component, RT5663_MIC_DECRO_3, in rt5663_impedance_sensing()
1687 snd_soc_component_write(component, RT5663_MIC_DECRO_5, in rt5663_impedance_sensing()
1689 snd_soc_component_write(component, RT5663_MIC_DECRO_6, in rt5663_impedance_sensing()
1692 snd_soc_component_write(component, RT5663_MIC_DECRO_2, in rt5663_impedance_sensing()
1694 snd_soc_component_write(component, RT5663_MIC_DECRO_3, in rt5663_impedance_sensing()
1696 snd_soc_component_write(component, RT5663_MIC_DECRO_5, in rt5663_impedance_sensing()
1698 snd_soc_component_write(component, RT5663_MIC_DECRO_6, in rt5663_impedance_sensing()
1702 reg84 = snd_soc_component_read(component, RT5663_ASRC_2); in rt5663_impedance_sensing()
1703 reg26 = snd_soc_component_read(component, RT5663_STO1_ADC_MIXER); in rt5663_impedance_sensing()
1704 reg2fa = snd_soc_component_read(component, RT5663_DUMMY_1); in rt5663_impedance_sensing()
1705 reg91 = snd_soc_component_read(component, RT5663_HP_CHARGE_PUMP_1); in rt5663_impedance_sensing()
1706 reg10 = snd_soc_component_read(component, RT5663_RECMIX); in rt5663_impedance_sensing()
1707 reg80 = snd_soc_component_read(component, RT5663_GLB_CLK); in rt5663_impedance_sensing()
1709 snd_soc_component_update_bits(component, RT5663_STO_DRE_1, 0x8000, 0); in rt5663_impedance_sensing()
1710 snd_soc_component_write(component, RT5663_ASRC_2, 0); in rt5663_impedance_sensing()
1711 snd_soc_component_write(component, RT5663_STO1_ADC_MIXER, 0x4040); in rt5663_impedance_sensing()
1712 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_impedance_sensing()
1717 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_impedance_sensing()
1720 snd_soc_component_update_bits(component, RT5663_GLB_CLK, RT5663_SCLK_SRC_MASK, in rt5663_impedance_sensing()
1722 snd_soc_component_update_bits(component, RT5663_RC_CLK, RT5663_DIG_25M_CLK_MASK, in rt5663_impedance_sensing()
1724 snd_soc_component_update_bits(component, RT5663_ADDA_CLK_1, RT5663_I2S_PD1_MASK, 0); in rt5663_impedance_sensing()
1725 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_1, 0xff00); in rt5663_impedance_sensing()
1726 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_2, 0xfffc); in rt5663_impedance_sensing()
1727 snd_soc_component_write(component, RT5663_HP_CHARGE_PUMP_1, 0x1232); in rt5663_impedance_sensing()
1728 snd_soc_component_write(component, RT5663_HP_LOGIC_2, 0x0005); in rt5663_impedance_sensing()
1729 snd_soc_component_write(component, RT5663_DEPOP_2, 0x3003); in rt5663_impedance_sensing()
1730 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0030, 0x0030); in rt5663_impedance_sensing()
1731 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0003, 0x0003); in rt5663_impedance_sensing()
1732 snd_soc_component_update_bits(component, RT5663_PWR_DIG_2, in rt5663_impedance_sensing()
1735 snd_soc_component_update_bits(component, RT5663_PWR_DIG_1, in rt5663_impedance_sensing()
1743 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_2, in rt5663_impedance_sensing()
1747 snd_soc_component_write(component, RT5663_HP_CHARGE_PUMP_2, 0x1371); in rt5663_impedance_sensing()
1748 snd_soc_component_write(component, RT5663_STO_DAC_MIXER, 0); in rt5663_impedance_sensing()
1749 snd_soc_component_write(component, RT5663_BYPASS_STO_DAC, 0x000c); in rt5663_impedance_sensing()
1750 snd_soc_component_write(component, RT5663_HP_BIAS, 0xafaa); in rt5663_impedance_sensing()
1751 snd_soc_component_write(component, RT5663_CHARGE_PUMP_1, 0x2224); in rt5663_impedance_sensing()
1752 snd_soc_component_write(component, RT5663_HP_OUT_EN, 0x8088); in rt5663_impedance_sensing()
1753 snd_soc_component_write(component, RT5663_CHOP_ADC, 0x3000); in rt5663_impedance_sensing()
1754 snd_soc_component_write(component, RT5663_ADDA_RST, 0xc000); in rt5663_impedance_sensing()
1755 snd_soc_component_write(component, RT5663_STO1_HPF_ADJ1, 0x3320); in rt5663_impedance_sensing()
1756 snd_soc_component_write(component, RT5663_HP_CALIB_2, 0x00c9); in rt5663_impedance_sensing()
1757 snd_soc_component_write(component, RT5663_DUMMY_1, 0x004c); in rt5663_impedance_sensing()
1758 snd_soc_component_write(component, RT5663_ANA_BIAS_CUR_1, 0x7733); in rt5663_impedance_sensing()
1759 snd_soc_component_write(component, RT5663_CHARGE_PUMP_2, 0x7777); in rt5663_impedance_sensing()
1760 snd_soc_component_write(component, RT5663_STO_DRE_9, 0x0007); in rt5663_impedance_sensing()
1761 snd_soc_component_write(component, RT5663_STO_DRE_10, 0x0007); in rt5663_impedance_sensing()
1762 snd_soc_component_write(component, RT5663_DUMMY_2, 0x02a4); in rt5663_impedance_sensing()
1763 snd_soc_component_write(component, RT5663_RECMIX, 0x0005); in rt5663_impedance_sensing()
1764 snd_soc_component_write(component, RT5663_HP_IMP_SEN_1, 0x4334); in rt5663_impedance_sensing()
1765 snd_soc_component_update_bits(component, RT5663_IRQ_3, 0x0004, 0x0004); in rt5663_impedance_sensing()
1766 snd_soc_component_write(component, RT5663_HP_LOGIC_1, 0x2200); in rt5663_impedance_sensing()
1767 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x3000, 0x3000); in rt5663_impedance_sensing()
1768 snd_soc_component_write(component, RT5663_HP_LOGIC_1, 0x6200); in rt5663_impedance_sensing()
1772 if (snd_soc_component_read(component, RT5663_INT_ST_1) & 0x2) in rt5663_impedance_sensing()
1776 value = snd_soc_component_read(component, RT5663_HP_IMP_SEN_4); in rt5663_impedance_sensing()
1778 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x3000, 0); in rt5663_impedance_sensing()
1779 snd_soc_component_write(component, RT5663_INT_ST_1, 0); in rt5663_impedance_sensing()
1780 snd_soc_component_write(component, RT5663_HP_LOGIC_1, 0); in rt5663_impedance_sensing()
1781 snd_soc_component_update_bits(component, RT5663_RC_CLK, RT5663_DIG_25M_CLK_MASK, in rt5663_impedance_sensing()
1783 snd_soc_component_write(component, RT5663_GLB_CLK, reg80); in rt5663_impedance_sensing()
1784 snd_soc_component_write(component, RT5663_RECMIX, reg10); in rt5663_impedance_sensing()
1785 snd_soc_component_write(component, RT5663_DUMMY_2, 0x00a4); in rt5663_impedance_sensing()
1786 snd_soc_component_write(component, RT5663_DUMMY_1, reg2fa); in rt5663_impedance_sensing()
1787 snd_soc_component_write(component, RT5663_HP_CALIB_2, 0x00c8); in rt5663_impedance_sensing()
1788 snd_soc_component_write(component, RT5663_STO1_HPF_ADJ1, 0xb320); in rt5663_impedance_sensing()
1789 snd_soc_component_write(component, RT5663_ADDA_RST, 0xe400); in rt5663_impedance_sensing()
1790 snd_soc_component_write(component, RT5663_CHOP_ADC, 0x2000); in rt5663_impedance_sensing()
1791 snd_soc_component_write(component, RT5663_HP_OUT_EN, 0x0008); in rt5663_impedance_sensing()
1792 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_2, in rt5663_impedance_sensing()
1794 snd_soc_component_update_bits(component, RT5663_PWR_DIG_1, in rt5663_impedance_sensing()
1798 snd_soc_component_update_bits(component, RT5663_PWR_DIG_2, in rt5663_impedance_sensing()
1800 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0003, 0); in rt5663_impedance_sensing()
1801 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0030, 0); in rt5663_impedance_sensing()
1802 snd_soc_component_write(component, RT5663_HP_LOGIC_2, 0); in rt5663_impedance_sensing()
1803 snd_soc_component_write(component, RT5663_HP_CHARGE_PUMP_1, reg91); in rt5663_impedance_sensing()
1804 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_impedance_sensing()
1806 snd_soc_component_write(component, RT5663_STO1_ADC_MIXER, reg26); in rt5663_impedance_sensing()
1807 snd_soc_component_write(component, RT5663_ASRC_2, reg84); in rt5663_impedance_sensing()
1815 snd_soc_component_update_bits(component, RT5663_STO_DRE_9, RT5663_DRE_GAIN_HP_MASK, in rt5663_impedance_sensing()
1817 snd_soc_component_update_bits(component, RT5663_STO_DRE_10, RT5663_DRE_GAIN_HP_MASK, in rt5663_impedance_sensing()
1821 snd_soc_component_write(component, RT5663_MIC_DECRO_2, in rt5663_impedance_sensing()
1823 snd_soc_component_write(component, RT5663_MIC_DECRO_3, in rt5663_impedance_sensing()
1825 snd_soc_component_write(component, RT5663_MIC_DECRO_5, in rt5663_impedance_sensing()
1827 snd_soc_component_write(component, RT5663_MIC_DECRO_6, in rt5663_impedance_sensing()
1830 snd_soc_component_write(component, RT5663_MIC_DECRO_2, in rt5663_impedance_sensing()
1832 snd_soc_component_write(component, RT5663_MIC_DECRO_3, in rt5663_impedance_sensing()
1834 snd_soc_component_write(component, RT5663_MIC_DECRO_5, in rt5663_impedance_sensing()
1836 snd_soc_component_write(component, RT5663_MIC_DECRO_6, in rt5663_impedance_sensing()
1843 static int rt5663_button_detect(struct snd_soc_component *component) in rt5663_button_detect() argument
1847 val = snd_soc_component_read(component, RT5663_IL_CMD_5); in rt5663_button_detect()
1848 dev_dbg(component->dev, "%s: val=0x%x\n", __func__, val); in rt5663_button_detect()
1850 snd_soc_component_write(component, RT5663_IL_CMD_5, val); in rt5663_button_detect()
1868 static int rt5663_set_jack_detect(struct snd_soc_component *component, in rt5663_set_jack_detect() argument
1871 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_jack_detect()
1880 static bool rt5663_check_jd_status(struct snd_soc_component *component) in rt5663_check_jd_status() argument
1882 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_check_jd_status()
1883 int val = snd_soc_component_read(component, RT5663_INT_ST_1); in rt5663_check_jd_status()
1885 dev_dbg(component->dev, "%s val=%x\n", __func__, val); in rt5663_check_jd_status()
1894 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_check_jd_status()
1904 struct snd_soc_component *component = rt5663->component; in rt5663_jack_detect_work() local
1907 if (!component) in rt5663_jack_detect_work()
1910 if (rt5663_check_jd_status(component)) { in rt5663_jack_detect_work()
1917 rt5663->component, 1); in rt5663_jack_detect_work()
1920 report = rt5663_jack_detect(rt5663->component, 1); in rt5663_jack_detect_work()
1922 rt5663_impedance_sensing(rt5663->component); in rt5663_jack_detect_work()
1925 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_jack_detect_work()
1933 btn_type = rt5663_button_detect(rt5663->component); in rt5663_jack_detect_work()
1966 dev_err(rt5663->component->dev, in rt5663_jack_detect_work()
1986 report = rt5663_v2_jack_detect(rt5663->component, 0); in rt5663_jack_detect_work()
1989 report = rt5663_jack_detect(rt5663->component, 0); in rt5663_jack_detect_work()
1992 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_jack_detect_work()
1995 dev_dbg(component->dev, "%s jack report: 0x%04x\n", __func__, report); in rt5663_jack_detect_work()
2005 struct snd_soc_component *component = rt5663->component; in rt5663_jd_unplug_work() local
2007 if (!component) in rt5663_jd_unplug_work()
2010 if (!rt5663_check_jd_status(component)) { in rt5663_jd_unplug_work()
2014 rt5663_v2_jack_detect(rt5663->component, 0); in rt5663_jd_unplug_work()
2017 rt5663_jack_detect(rt5663->component, 0); in rt5663_jd_unplug_work()
2020 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_jd_unplug_work()
2074 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_is_sys_clk_from_pll() local
2076 val = snd_soc_component_read(component, RT5663_GLB_CLK); in rt5663_is_sys_clk_from_pll()
2088 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_is_using_asrc() local
2089 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_is_using_asrc()
2119 val = (snd_soc_component_read(component, reg) >> shift) & 0x7; in rt5663_is_using_asrc()
2130 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in rt5663_i2s_use_asrc() local
2131 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_i2s_use_asrc()
2134 da_asrc_en = (snd_soc_component_read(component, RT5663_ASRC_2) & in rt5663_i2s_use_asrc()
2138 ad_asrc_en = (snd_soc_component_read(component, RT5663_ASRC_3) & in rt5663_i2s_use_asrc()
2142 ad_asrc_en = (snd_soc_component_read(component, RT5663_ASRC_2) & in rt5663_i2s_use_asrc()
2146 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_i2s_use_asrc()
2154 dev_err(component->dev, "sysclk < 384 x fs, disable i2s asrc\n"); in rt5663_i2s_use_asrc()
2161 * @component: SoC audio component device.
2173 int rt5663_sel_asrc_clk_src(struct snd_soc_component *component, in rt5663_sel_asrc_clk_src() argument
2176 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_sel_asrc_clk_src()
2207 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_sel_asrc_clk_src()
2212 snd_soc_component_update_bits(component, RT5663_ASRC_2, asrc2_mask, in rt5663_sel_asrc_clk_src()
2216 snd_soc_component_update_bits(component, RT5663_ASRC_3, asrc3_mask, in rt5663_sel_asrc_clk_src()
2322 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_hp_event() local
2323 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_hp_event()
2328 snd_soc_component_update_bits(component, RT5663_HP_CHARGE_PUMP_1, in rt5663_hp_event()
2330 snd_soc_component_update_bits(component, RT5663_HP_LOGIC_2, in rt5663_hp_event()
2334 snd_soc_component_update_bits(component, in rt5663_hp_event()
2336 snd_soc_component_write(component, RT5663_DEPOP_2, 0x3003); in rt5663_hp_event()
2337 snd_soc_component_update_bits(component, RT5663_HP_CHARGE_PUMP_1, in rt5663_hp_event()
2339 snd_soc_component_write(component, RT5663_HP_CHARGE_PUMP_2, 0x1371); in rt5663_hp_event()
2340 snd_soc_component_write(component, RT5663_HP_BIAS, 0xabba); in rt5663_hp_event()
2341 snd_soc_component_write(component, RT5663_CHARGE_PUMP_1, 0x2224); in rt5663_hp_event()
2342 snd_soc_component_write(component, RT5663_ANA_BIAS_CUR_1, 0x7766); in rt5663_hp_event()
2343 snd_soc_component_write(component, RT5663_HP_BIAS, 0xafaa); in rt5663_hp_event()
2344 snd_soc_component_write(component, RT5663_CHARGE_PUMP_2, 0x7777); in rt5663_hp_event()
2345 snd_soc_component_update_bits(component, RT5663_STO_DRE_1, 0x8000, in rt5663_hp_event()
2347 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x3000, in rt5663_hp_event()
2349 snd_soc_component_update_bits(component, in rt5663_hp_event()
2356 snd_soc_component_update_bits(component, RT5663_HP_LOGIC_2, in rt5663_hp_event()
2360 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x3000, 0x0); in rt5663_hp_event()
2361 snd_soc_component_update_bits(component, RT5663_HP_CHARGE_PUMP_1, in rt5663_hp_event()
2363 snd_soc_component_update_bits(component, in rt5663_hp_event()
2365 snd_soc_component_update_bits(component, in rt5663_hp_event()
2380 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_charge_pump_event() local
2381 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_charge_pump_event()
2386 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0030, in rt5663_charge_pump_event()
2388 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0003, in rt5663_charge_pump_event()
2395 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0003, 0); in rt5663_charge_pump_event()
2396 snd_soc_component_update_bits(component, RT5663_DEPOP_1, 0x0030, 0); in rt5663_charge_pump_event()
2410 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_bst2_power() local
2414 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_2, in rt5663_bst2_power()
2420 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_2, in rt5663_bst2_power()
2434 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5663_pre_div_power() local
2438 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_1, 0xff00); in rt5663_pre_div_power()
2439 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_2, 0xfffc); in rt5663_pre_div_power()
2443 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_1, 0x0000); in rt5663_pre_div_power()
2444 snd_soc_component_write(component, RT5663_PRE_DIV_GATING_2, 0x0000); in rt5663_pre_div_power()
2766 struct snd_soc_component *component = dai->component; in rt5663_hw_params() local
2767 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_hw_params()
2778 dev_err(component->dev, "Unsupported clock setting %d for DAI %d\n", in rt5663_hw_params()
2802 snd_soc_component_update_bits(component, RT5663_I2S1_SDP, in rt5663_hw_params()
2805 snd_soc_component_update_bits(component, RT5663_ADDA_CLK_1, in rt5663_hw_params()
2813 struct snd_soc_component *component = dai->component; in rt5663_set_dai_fmt() local
2852 snd_soc_component_update_bits(component, RT5663_I2S1_SDP, RT5663_I2S_MS_MASK | in rt5663_set_dai_fmt()
2861 struct snd_soc_component *component = dai->component; in rt5663_set_dai_sysclk() local
2862 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_dai_sysclk()
2879 dev_err(component->dev, "Invalid clock id (%d)\n", clk_id); in rt5663_set_dai_sysclk()
2882 snd_soc_component_update_bits(component, RT5663_GLB_CLK, RT5663_SCLK_SRC_MASK, in rt5663_set_dai_sysclk()
2887 dev_dbg(component->dev, "Sysclk is %dHz and clock id is %d\n", in rt5663_set_dai_sysclk()
2896 struct snd_soc_component *component = dai->component; in rt5663_set_dai_pll() local
2897 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_dai_pll()
2907 dev_dbg(component->dev, "PLL disabled\n"); in rt5663_set_dai_pll()
2911 snd_soc_component_update_bits(component, RT5663_GLB_CLK, in rt5663_set_dai_pll()
2926 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_set_dai_pll()
2938 dev_err(component->dev, "Unknown PLL source %d\n", source); in rt5663_set_dai_pll()
2941 snd_soc_component_update_bits(component, RT5663_GLB_CLK, mask, (val << shift)); in rt5663_set_dai_pll()
2945 dev_err(component->dev, "Unsupported input clock %d\n", freq_in); in rt5663_set_dai_pll()
2949 dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n", pll_code.m_bp, in rt5663_set_dai_pll()
2953 snd_soc_component_write(component, RT5663_PLL_1, in rt5663_set_dai_pll()
2955 snd_soc_component_write(component, RT5663_PLL_2, in rt5663_set_dai_pll()
2969 struct snd_soc_component *component = dai->component; in rt5663_set_tdm_slot() local
2970 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_tdm_slot()
3022 dev_err(component->dev, "Unknown CODEC Version\n"); in rt5663_set_tdm_slot()
3026 snd_soc_component_update_bits(component, reg, RT5663_TDM_MODE_MASK | in rt5663_set_tdm_slot()
3035 struct snd_soc_component *component = dai->component; in rt5663_set_bclk_ratio() local
3036 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_bclk_ratio()
3039 dev_dbg(component->dev, "%s ratio = %d\n", __func__, ratio); in rt5663_set_bclk_ratio()
3048 snd_soc_component_update_bits(component, reg, in rt5663_set_bclk_ratio()
3053 snd_soc_component_update_bits(component, reg, in rt5663_set_bclk_ratio()
3058 snd_soc_component_update_bits(component, reg, in rt5663_set_bclk_ratio()
3063 snd_soc_component_update_bits(component, reg, in rt5663_set_bclk_ratio()
3068 dev_err(component->dev, "Invalid ratio!\n"); in rt5663_set_bclk_ratio()
3075 static int rt5663_set_bias_level(struct snd_soc_component *component, in rt5663_set_bias_level() argument
3078 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_set_bias_level()
3082 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_set_bias_level()
3089 snd_soc_component_update_bits(component, RT5663_DIG_MISC, in rt5663_set_bias_level()
3092 snd_soc_component_update_bits(component, RT5663_SIG_CLK_DET, in rt5663_set_bias_level()
3102 snd_soc_component_update_bits(component, RT5663_DIG_MISC, in rt5663_set_bias_level()
3105 snd_soc_component_update_bits(component, RT5663_PWR_ANLG_1, in rt5663_set_bias_level()
3112 snd_soc_component_update_bits(component, RT5663_SIG_CLK_DET, in rt5663_set_bias_level()
3122 snd_soc_component_update_bits(component, in rt5663_set_bias_level()
3128 snd_soc_component_update_bits(component, in rt5663_set_bias_level()
3141 static int rt5663_probe(struct snd_soc_component *component) in rt5663_probe() argument
3143 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in rt5663_probe()
3144 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_probe()
3146 rt5663->component = component; in rt5663_probe()
3156 snd_soc_add_component_controls(component, rt5663_v2_specific_controls, in rt5663_probe()
3166 snd_soc_add_component_controls(component, rt5663_specific_controls, in rt5663_probe()
3170 snd_soc_add_component_controls(component, rt5663_hpvol_controls, in rt5663_probe()
3178 static void rt5663_remove(struct snd_soc_component *component) in rt5663_remove() argument
3180 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_remove()
3186 static int rt5663_suspend(struct snd_soc_component *component) in rt5663_suspend() argument
3188 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_suspend()
3202 static int rt5663_resume(struct snd_soc_component *component) in rt5663_resume() argument
3204 struct rt5663_priv *rt5663 = snd_soc_component_get_drvdata(component); in rt5663_resume()