twl4030 64 sound/soc/codecs/twl4030.c static void tw4030_init_ctl_cache(struct twl4030_priv *twl4030) twl4030 71 sound/soc/codecs/twl4030.c twl4030->ctl_cache[i - TWL4030_REG_EAR_CTL] = byte; twl4030 77 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 90 sound/soc/codecs/twl4030.c value = twl4030->ctl_cache[reg - TWL4030_REG_EAR_CTL]; twl4030 100 sound/soc/codecs/twl4030.c static bool twl4030_can_write_to_chip(struct twl4030_priv *twl4030, twl4030 108 sound/soc/codecs/twl4030.c if (twl4030->earpiece_enabled) twl4030 112 sound/soc/codecs/twl4030.c if (twl4030->predrivel_enabled) twl4030 116 sound/soc/codecs/twl4030.c if (twl4030->predriver_enabled) twl4030 120 sound/soc/codecs/twl4030.c if (twl4030->carkitl_enabled) twl4030 124 sound/soc/codecs/twl4030.c if (twl4030->carkitr_enabled) twl4030 128 sound/soc/codecs/twl4030.c if (twl4030->hsl_enabled || twl4030->hsr_enabled) twl4030 143 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 153 sound/soc/codecs/twl4030.c twl4030->ctl_cache[reg - TWL4030_REG_EAR_CTL] = value; twl4030 159 sound/soc/codecs/twl4030.c if (twl4030_can_write_to_chip(twl4030, reg)) twl4030 177 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 180 sound/soc/codecs/twl4030.c if (enable == twl4030->codec_powered) twl4030 189 sound/soc/codecs/twl4030.c twl4030->codec_powered = enable; twl4030 242 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 278 sound/soc/codecs/twl4030.c tw4030_init_ctl_cache(twl4030); twl4030 296 sound/soc/codecs/twl4030.c twl4030->pdata = pdata; twl4030 333 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 336 sound/soc/codecs/twl4030.c twl4030->apll_enabled++; twl4030 337 sound/soc/codecs/twl4030.c if (twl4030->apll_enabled == 1) twl4030 341 sound/soc/codecs/twl4030.c twl4030->apll_enabled--; twl4030 342 sound/soc/codecs/twl4030.c if (!twl4030->apll_enabled) twl4030 557 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); \ twl4030 561 sound/soc/codecs/twl4030.c twl4030->pin_name##_enabled = 1; \ twl4030 565 sound/soc/codecs/twl4030.c twl4030->pin_name##_enabled = 0; \ twl4030 694 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 695 sound/soc/codecs/twl4030.c struct twl4030_codec_data *pdata = twl4030->pdata; twl4030 704 sound/soc/codecs/twl4030.c twl4030->sysclk) + 1; twl4030 758 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 763 sound/soc/codecs/twl4030.c if (!twl4030->hsr_enabled) twl4030 766 sound/soc/codecs/twl4030.c twl4030->hsl_enabled = 1; twl4030 770 sound/soc/codecs/twl4030.c if (!twl4030->hsr_enabled) twl4030 773 sound/soc/codecs/twl4030.c twl4030->hsl_enabled = 0; twl4030 783 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 788 sound/soc/codecs/twl4030.c if (!twl4030->hsl_enabled) twl4030 791 sound/soc/codecs/twl4030.c twl4030->hsr_enabled = 1; twl4030 795 sound/soc/codecs/twl4030.c if (!twl4030->hsl_enabled) twl4030 798 sound/soc/codecs/twl4030.c twl4030->hsr_enabled = 0; twl4030 808 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 809 sound/soc/codecs/twl4030.c struct twl4030_codec_data *pdata = twl4030->pdata; twl4030 958 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 960 sound/soc/codecs/twl4030.c if (twl4030->configured) { twl4030 1588 sound/soc/codecs/twl4030.c static void twl4030_constraints(struct twl4030_priv *twl4030, twl4030 1594 sound/soc/codecs/twl4030.c if (mst_substream == twl4030->master_substream) twl4030 1595 sound/soc/codecs/twl4030.c slv_substream = twl4030->slave_substream; twl4030 1596 sound/soc/codecs/twl4030.c else if (mst_substream == twl4030->slave_substream) twl4030 1597 sound/soc/codecs/twl4030.c slv_substream = twl4030->master_substream; twl4030 1604 sound/soc/codecs/twl4030.c twl4030->rate); twl4030 1608 sound/soc/codecs/twl4030.c twl4030->sample_bits); twl4030 1612 sound/soc/codecs/twl4030.c twl4030->channels); twl4030 1641 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1643 sound/soc/codecs/twl4030.c if (twl4030->master_substream) { twl4030 1644 sound/soc/codecs/twl4030.c twl4030->slave_substream = substream; twl4030 1648 sound/soc/codecs/twl4030.c if (twl4030->configured) twl4030 1649 sound/soc/codecs/twl4030.c twl4030_constraints(twl4030, twl4030->master_substream); twl4030 1660 sound/soc/codecs/twl4030.c twl4030->master_substream = substream; twl4030 1670 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1672 sound/soc/codecs/twl4030.c if (twl4030->master_substream == substream) twl4030 1673 sound/soc/codecs/twl4030.c twl4030->master_substream = twl4030->slave_substream; twl4030 1675 sound/soc/codecs/twl4030.c twl4030->slave_substream = NULL; twl4030 1679 sound/soc/codecs/twl4030.c if (!twl4030->master_substream) twl4030 1680 sound/soc/codecs/twl4030.c twl4030->configured = 0; twl4030 1681 sound/soc/codecs/twl4030.c else if (!twl4030->master_substream->runtime->channels) twl4030 1682 sound/soc/codecs/twl4030.c twl4030->configured = 0; twl4030 1694 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1711 sound/soc/codecs/twl4030.c if (twl4030->configured) twl4030 1775 sound/soc/codecs/twl4030.c if (twl4030->codec_powered) { twl4030 1792 sound/soc/codecs/twl4030.c twl4030->configured = 1; twl4030 1793 sound/soc/codecs/twl4030.c twl4030->rate = params_rate(params); twl4030 1794 sound/soc/codecs/twl4030.c twl4030->sample_bits = hw_param_interval(params, twl4030 1796 sound/soc/codecs/twl4030.c twl4030->channels = params_channels(params); twl4030 1801 sound/soc/codecs/twl4030.c if (twl4030->slave_substream) twl4030 1802 sound/soc/codecs/twl4030.c twl4030_constraints(twl4030, substream); twl4030 1811 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1823 sound/soc/codecs/twl4030.c if ((freq / 1000) != twl4030->sysclk) { twl4030 1826 sound/soc/codecs/twl4030.c freq, twl4030->sysclk * 1000); twl4030 1836 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1871 sound/soc/codecs/twl4030.c if (twl4030->codec_powered) { twl4030 1926 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1932 sound/soc/codecs/twl4030.c if (twl4030->sysclk != 26000) { twl4030 1935 sound/soc/codecs/twl4030.c __func__, twl4030->sysclk); twl4030 1968 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 1993 sound/soc/codecs/twl4030.c if (twl4030->codec_powered) { twl4030 2013 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 2021 sound/soc/codecs/twl4030.c if ((freq / 1000) != twl4030->sysclk) { twl4030 2024 sound/soc/codecs/twl4030.c freq, twl4030->sysclk * 1000); twl4030 2034 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 2066 sound/soc/codecs/twl4030.c if (twl4030->codec_powered) { twl4030 2155 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030; twl4030 2157 sound/soc/codecs/twl4030.c twl4030 = devm_kzalloc(component->dev, sizeof(struct twl4030_priv), twl4030 2159 sound/soc/codecs/twl4030.c if (!twl4030) twl4030 2161 sound/soc/codecs/twl4030.c snd_soc_component_set_drvdata(component, twl4030); twl4030 2163 sound/soc/codecs/twl4030.c twl4030->sysclk = twl4030_audio_get_mclk() / 1000; twl4030 2172 sound/soc/codecs/twl4030.c struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); twl4030 2173 sound/soc/codecs/twl4030.c struct twl4030_codec_data *pdata = twl4030->pdata;