Lines Matching refs:twl4030

193 	struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);  in twl4030_write()  local
201 if (twl4030->earpiece_enabled) in twl4030_write()
205 if (twl4030->predrivel_enabled) in twl4030_write()
209 if (twl4030->predriver_enabled) in twl4030_write()
213 if (twl4030->carkitl_enabled) in twl4030_write()
217 if (twl4030->carkitr_enabled) in twl4030_write()
221 if (twl4030->hsl_enabled || twl4030->hsr_enabled) in twl4030_write()
248 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_codec_enable() local
251 if (enable == twl4030->codec_powered) in twl4030_codec_enable()
261 twl4030->codec_powered = enable; in twl4030_codec_enable()
302 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_init_chip() local
335 twl4030->digimic_delay = pdata->digimic_delay; in twl4030_init_chip()
373 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_apll_enable() local
377 twl4030->apll_enabled++; in twl4030_apll_enable()
378 if (twl4030->apll_enabled == 1) in twl4030_apll_enable()
382 twl4030->apll_enabled--; in twl4030_apll_enable()
383 if (!twl4030->apll_enabled) in twl4030_apll_enable()
607 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(w->codec); \
611 twl4030->pin_name##_enabled = 1; \
616 twl4030->pin_name##_enabled = 0; \
739 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in headset_ramp() local
748 twl4030->sysclk) + 1; in headset_ramp()
803 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(w->codec); in headsetlpga_event() local
808 if (!twl4030->hsr_enabled) in headsetlpga_event()
811 twl4030->hsl_enabled = 1; in headsetlpga_event()
815 if (!twl4030->hsr_enabled) in headsetlpga_event()
818 twl4030->hsl_enabled = 0; in headsetlpga_event()
827 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(w->codec); in headsetrpga_event() local
832 if (!twl4030->hsl_enabled) in headsetrpga_event()
835 twl4030->hsr_enabled = 1; in headsetrpga_event()
839 if (!twl4030->hsl_enabled) in headsetrpga_event()
842 twl4030->hsr_enabled = 0; in headsetrpga_event()
851 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(w->codec); in digimic_event() local
853 if (twl4030->digimic_delay) in digimic_event()
854 twl4030_wait_ms(twl4030->digimic_delay); in digimic_event()
1029 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in snd_soc_put_twl4030_opmode_enum_double() local
1034 if (twl4030->configured) { in snd_soc_put_twl4030_opmode_enum_double()
1670 static void twl4030_constraints(struct twl4030_priv *twl4030, in twl4030_constraints() argument
1676 if (mst_substream == twl4030->master_substream) in twl4030_constraints()
1677 slv_substream = twl4030->slave_substream; in twl4030_constraints()
1678 else if (mst_substream == twl4030->slave_substream) in twl4030_constraints()
1679 slv_substream = twl4030->master_substream; in twl4030_constraints()
1686 twl4030->rate, in twl4030_constraints()
1687 twl4030->rate); in twl4030_constraints()
1691 twl4030->sample_bits, in twl4030_constraints()
1692 twl4030->sample_bits); in twl4030_constraints()
1696 twl4030->channels, in twl4030_constraints()
1697 twl4030->channels); in twl4030_constraints()
1727 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_startup() local
1730 if (twl4030->master_substream) { in twl4030_startup()
1731 twl4030->slave_substream = substream; in twl4030_startup()
1735 if (twl4030->configured) in twl4030_startup()
1736 twl4030_constraints(twl4030, twl4030->master_substream); in twl4030_startup()
1747 twl4030->master_substream = substream; in twl4030_startup()
1758 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_shutdown() local
1760 if (twl4030->master_substream == substream) in twl4030_shutdown()
1761 twl4030->master_substream = twl4030->slave_substream; in twl4030_shutdown()
1763 twl4030->slave_substream = NULL; in twl4030_shutdown()
1767 if (!twl4030->master_substream) in twl4030_shutdown()
1768 twl4030->configured = 0; in twl4030_shutdown()
1769 else if (!twl4030->master_substream->runtime->channels) in twl4030_shutdown()
1770 twl4030->configured = 0; in twl4030_shutdown()
1783 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_hw_params() local
1800 if (twl4030->configured) in twl4030_hw_params()
1864 if (twl4030->codec_powered) { in twl4030_hw_params()
1881 twl4030->configured = 1; in twl4030_hw_params()
1882 twl4030->rate = params_rate(params); in twl4030_hw_params()
1883 twl4030->sample_bits = hw_param_interval(params, in twl4030_hw_params()
1885 twl4030->channels = params_channels(params); in twl4030_hw_params()
1890 if (twl4030->slave_substream) in twl4030_hw_params()
1891 twl4030_constraints(twl4030, substream); in twl4030_hw_params()
1900 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_set_dai_sysclk() local
1912 if ((freq / 1000) != twl4030->sysclk) { in twl4030_set_dai_sysclk()
1915 freq, twl4030->sysclk * 1000); in twl4030_set_dai_sysclk()
1926 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_set_dai_fmt() local
1961 if (twl4030->codec_powered) { in twl4030_set_dai_fmt()
2017 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_voice_startup() local
2023 if (twl4030->sysclk != 26000) { in twl4030_voice_startup()
2026 twl4030->sysclk * 1000); in twl4030_voice_startup()
2060 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_voice_hw_params() local
2085 if (twl4030->codec_powered) { in twl4030_voice_hw_params()
2105 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_voice_set_dai_sysclk() local
2112 if ((freq / 1000) != twl4030->sysclk) { in twl4030_voice_set_dai_sysclk()
2115 freq, twl4030->sysclk * 1000); in twl4030_voice_set_dai_sysclk()
2125 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_voice_set_dai_fmt() local
2157 if (twl4030->codec_powered) { in twl4030_voice_set_dai_fmt()
2256 struct twl4030_priv *twl4030; in twl4030_soc_probe() local
2258 twl4030 = kzalloc(sizeof(struct twl4030_priv), GFP_KERNEL); in twl4030_soc_probe()
2259 if (twl4030 == NULL) { in twl4030_soc_probe()
2263 snd_soc_codec_set_drvdata(codec, twl4030); in twl4030_soc_probe()
2265 twl4030->sysclk = twl4030_codec_get_mclk() / 1000; in twl4030_soc_probe()
2278 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_soc_remove() local
2283 kfree(twl4030); in twl4030_soc_remove()