adau              312 sound/soc/amd/acp-da7219-max98357a.c SND_SOC_DAILINK_DEF(adau,
adau              355 sound/soc/amd/acp-da7219-max98357a.c 		SND_SOC_DAILINK_REG(designware3, adau, platform),
adau              365 sound/soc/amd/acp-da7219-max98357a.c 		SND_SOC_DAILINK_REG(designware2, adau, platform),
adau              258 sound/soc/codecs/adau1761.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              262 sound/soc/codecs/adau1761.c 	regmap_write(adau->regmap, ADAU1761_DEJITTER, 0);
adau              263 sound/soc/codecs/adau1761.c 	if (!adau->master)
adau              264 sound/soc/codecs/adau1761.c 		regmap_write(adau->regmap, ADAU1761_DEJITTER, 3);
adau              450 sound/soc/codecs/adau1761.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              458 sound/soc/codecs/adau1761.c 		regcache_cache_only(adau->regmap, false);
adau              459 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau              463 sound/soc/codecs/adau1761.c 			regcache_sync(adau->regmap);
adau              466 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau              468 sound/soc/codecs/adau1761.c 		regcache_cache_only(adau->regmap, true);
adau              490 sound/soc/codecs/adau1761.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              544 sound/soc/codecs/adau1761.c 	regmap_write(adau->regmap, ADAU1761_DIGMIC_JACKDETECT, val);
adau              552 sound/soc/codecs/adau1761.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              566 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_PLAY_MONO_OUTPUT_VOL,
adau              573 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_PLAY_HP_RIGHT_VOL,
adau              647 sound/soc/codecs/adau1761.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              655 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_LEFT_DIFF_INPUT_VOL,
adau              658 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_RIGHT_DIFF_INPUT_VOL,
adau              678 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_LEFT_VOL,
adau              681 sound/soc/codecs/adau1761.c 		regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_RIGHT_VOL,
adau              697 sound/soc/codecs/adau1761.c 	if (adau->type == ADAU1761) {
adau              177 sound/soc/codecs/adau1781.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              181 sound/soc/codecs/adau1781.c 	regmap_write(adau->regmap, ADAU1781_DEJITTER, 0);
adau              182 sound/soc/codecs/adau1781.c 	if (!adau->master)
adau              183 sound/soc/codecs/adau1781.c 		regmap_write(adau->regmap, ADAU1781_DEJITTER, 5);
adau              319 sound/soc/codecs/adau1781.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              327 sound/soc/codecs/adau1781.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau              332 sound/soc/codecs/adau1781.c 		regmap_update_bits(adau->regmap, ADAU1781_DIG_PWDN1, 0x8, 0x8);
adau              335 sound/soc/codecs/adau1781.c 		regmap_update_bits(adau->regmap, ADAU1781_DIG_PWDN1, 0xc, 0x0);
adau              336 sound/soc/codecs/adau1781.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau              368 sound/soc/codecs/adau1781.c static int adau1781_set_input_mode(struct adau *adau, unsigned int reg,
adau              378 sound/soc/codecs/adau1781.c 	return regmap_update_bits(adau->regmap, reg,
adau              386 sound/soc/codecs/adau1781.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              394 sound/soc/codecs/adau1781.c 		ret = adau1781_set_input_mode(adau, ADAU1781_LEFT_PGA,
adau              398 sound/soc/codecs/adau1781.c 		ret = adau1781_set_input_mode(adau, ADAU1781_RIGHT_PGA,
adau               76 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau               79 sound/soc/codecs/adau17x1.c 		adau->pll_regs[5] = 1;
adau               81 sound/soc/codecs/adau17x1.c 		adau->pll_regs[5] = 0;
adau               84 sound/soc/codecs/adau17x1.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau               89 sound/soc/codecs/adau17x1.c 	regmap_raw_write(adau->regmap, ADAU17X1_PLL_CONTROL,
adau               90 sound/soc/codecs/adau17x1.c 			adau->pll_regs, ARRAY_SIZE(adau->pll_regs));
adau               94 sound/soc/codecs/adau17x1.c 		regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL,
adau              106 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              115 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
adau              117 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
adau              191 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              204 sound/soc/codecs/adau17x1.c 		adau->dsp_bypass[stream] = false;
adau              207 sound/soc/codecs/adau17x1.c 		val = (adau->tdm_slot[stream] * 2) + 1;
adau              208 sound/soc/codecs/adau17x1.c 		adau->dsp_bypass[stream] = true;
adau              235 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              246 sound/soc/codecs/adau17x1.c 	ret = regmap_read(adau->regmap, reg, &val);
adau              325 sound/soc/codecs/adau17x1.c static bool adau17x1_has_dsp(struct adau *adau)
adau              327 sound/soc/codecs/adau17x1.c 	switch (adau->type) {
adau              337 sound/soc/codecs/adau17x1.c static bool adau17x1_has_safeload(struct adau *adau)
adau              339 sound/soc/codecs/adau17x1.c 	switch (adau->type) {
adau              352 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              358 sound/soc/codecs/adau17x1.c 	ret = adau_calc_pll_cfg(freq_in, freq_out, adau->pll_regs);
adau              363 sound/soc/codecs/adau17x1.c 	ret = regmap_raw_write(adau->regmap, ADAU17X1_PLL_CONTROL,
adau              364 sound/soc/codecs/adau17x1.c 			adau->pll_regs, ARRAY_SIZE(adau->pll_regs));
adau              368 sound/soc/codecs/adau17x1.c 	adau->pll_freq = freq_out;
adau              377 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(dai->component);
adau              386 sound/soc/codecs/adau17x1.c 		if (!adau->mclk)
adau              396 sound/soc/codecs/adau17x1.c 	switch (adau->clk_src) {
adau              408 sound/soc/codecs/adau17x1.c 	adau->sysclk = freq;
adau              420 sound/soc/codecs/adau17x1.c 	adau->clk_src = clk_id;
adau              428 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_dai_get_drvdata(dai);
adau              455 sound/soc/codecs/adau17x1.c 		clk_get_rate(adau->mclk), pll_rate);
adau              462 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              467 sound/soc/codecs/adau17x1.c 	switch (adau->clk_src) {
adau              474 sound/soc/codecs/adau17x1.c 		freq = adau->pll_freq;
adau              477 sound/soc/codecs/adau17x1.c 		freq = adau->sysclk;
adau              517 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
adau              519 sound/soc/codecs/adau17x1.c 	if (adau17x1_has_dsp(adau)) {
adau              520 sound/soc/codecs/adau17x1.c 		regmap_write(adau->regmap, ADAU17X1_SERIAL_SAMPLING_RATE, div);
adau              521 sound/soc/codecs/adau17x1.c 		regmap_write(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, dsp_div);
adau              524 sound/soc/codecs/adau17x1.c 	if (adau->sigmadsp) {
adau              530 sound/soc/codecs/adau17x1.c 	if (adau->dai_fmt != SND_SOC_DAIFMT_RIGHT_J)
adau              547 sound/soc/codecs/adau17x1.c 	return regmap_update_bits(adau->regmap, ADAU17X1_SERIAL_PORT1,
adau              554 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(dai->component);
adau              561 sound/soc/codecs/adau17x1.c 		adau->master = true;
adau              565 sound/soc/codecs/adau17x1.c 		adau->master = false;
adau              615 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_SERIAL_PORT0, ctrl0);
adau              616 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_SERIAL_PORT1, ctrl1);
adau              618 sound/soc/codecs/adau17x1.c 	adau->dai_fmt = fmt & SND_SOC_DAIFMT_FORMAT_MASK;
adau              626 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(dai->component);
adau              646 sound/soc/codecs/adau17x1.c 		if (adau->type == ADAU1361)
adau              657 sound/soc/codecs/adau17x1.c 		if (adau->type == ADAU1761)
adau              672 sound/soc/codecs/adau17x1.c 		if (adau->type == ADAU1361)
adau              684 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_CAPTURE] = 0;
adau              688 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_CAPTURE] = 1;
adau              692 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_CAPTURE] = 2;
adau              696 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_CAPTURE] = 3;
adau              705 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_PLAYBACK] = 0;
adau              709 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_PLAYBACK] = 1;
adau              713 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_PLAYBACK] = 2;
adau              717 sound/soc/codecs/adau17x1.c 		adau->tdm_slot[SNDRV_PCM_STREAM_PLAYBACK] = 3;
adau              723 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
adau              725 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER1,
adau              727 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_SERIAL_PORT0,
adau              729 sound/soc/codecs/adau17x1.c 	regmap_update_bits(adau->regmap, ADAU17X1_SERIAL_PORT1,
adau              732 sound/soc/codecs/adau17x1.c 	if (!adau17x1_has_dsp(adau))
adau              735 sound/soc/codecs/adau17x1.c 	if (adau->dsp_bypass[SNDRV_PCM_STREAM_PLAYBACK]) {
adau              736 sound/soc/codecs/adau17x1.c 		regmap_write(adau->regmap, ADAU17X1_SERIAL_INPUT_ROUTE,
adau              737 sound/soc/codecs/adau17x1.c 			(adau->tdm_slot[SNDRV_PCM_STREAM_PLAYBACK] * 2) + 1);
adau              740 sound/soc/codecs/adau17x1.c 	if (adau->dsp_bypass[SNDRV_PCM_STREAM_CAPTURE]) {
adau              741 sound/soc/codecs/adau17x1.c 		regmap_write(adau->regmap, ADAU17X1_SERIAL_OUTPUT_ROUTE,
adau              742 sound/soc/codecs/adau17x1.c 			(adau->tdm_slot[SNDRV_PCM_STREAM_CAPTURE] * 2) + 1);
adau              751 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(dai->component);
adau              753 sound/soc/codecs/adau17x1.c 	if (adau->sigmadsp)
adau              754 sound/soc/codecs/adau17x1.c 		return sigmadsp_restrict_params(adau->sigmadsp, substream);
adau              772 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              782 sound/soc/codecs/adau17x1.c 	return regmap_write(adau->regmap, ADAU17X1_MICBIAS, micbias << 2);
adau              863 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              872 sound/soc/codecs/adau17x1.c 	if (adau->sigmadsp->current_samplerate == rate)
adau              877 sound/soc/codecs/adau17x1.c 	ret = regmap_read(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, &dspsr);
adau              881 sound/soc/codecs/adau17x1.c 	ret = regmap_read(adau->regmap, ADAU17X1_DSP_RUN, &dsp_run);
adau              885 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_DSP_ENABLE, 1);
adau              886 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, 0xf);
adau              887 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_DSP_RUN, 0);
adau              889 sound/soc/codecs/adau17x1.c 	ret = sigmadsp_setup(adau->sigmadsp, rate);
adau              891 sound/soc/codecs/adau17x1.c 		regmap_write(adau->regmap, ADAU17X1_DSP_ENABLE, 0);
adau              894 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, dspsr);
adau              895 sound/soc/codecs/adau17x1.c 	regmap_write(adau->regmap, ADAU17X1_DSP_RUN, dsp_run);
adau              906 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              918 sound/soc/codecs/adau17x1.c 	if (adau17x1_has_dsp(adau)) {
adau              924 sound/soc/codecs/adau17x1.c 		if (!adau->sigmadsp)
adau              927 sound/soc/codecs/adau17x1.c 		ret = sigmadsp_attach(adau->sigmadsp, component);
adau              942 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              950 sound/soc/codecs/adau17x1.c 	if (adau17x1_has_dsp(adau)) {
adau              958 sound/soc/codecs/adau17x1.c 	if (adau->clk_src != ADAU17X1_CLK_SRC_MCLK)
adau              967 sound/soc/codecs/adau17x1.c 	struct adau *adau = snd_soc_component_get_drvdata(component);
adau              969 sound/soc/codecs/adau17x1.c 	if (adau->switch_mode)
adau              970 sound/soc/codecs/adau17x1.c 		adau->switch_mode(component->dev);
adau              972 sound/soc/codecs/adau17x1.c 	regcache_sync(adau->regmap);
adau             1032 sound/soc/codecs/adau17x1.c 	struct adau *adau;
adau             1038 sound/soc/codecs/adau17x1.c 	adau = devm_kzalloc(dev, sizeof(*adau), GFP_KERNEL);
adau             1039 sound/soc/codecs/adau17x1.c 	if (!adau)
adau             1042 sound/soc/codecs/adau17x1.c 	adau->mclk = devm_clk_get(dev, "mclk");
adau             1043 sound/soc/codecs/adau17x1.c 	if (IS_ERR(adau->mclk)) {
adau             1044 sound/soc/codecs/adau17x1.c 		if (PTR_ERR(adau->mclk) != -ENOENT)
adau             1045 sound/soc/codecs/adau17x1.c 			return PTR_ERR(adau->mclk);
adau             1047 sound/soc/codecs/adau17x1.c 		adau->mclk = NULL;
adau             1048 sound/soc/codecs/adau17x1.c 	} else if (adau->mclk) {
adau             1049 sound/soc/codecs/adau17x1.c 		adau->clk_src = ADAU17X1_CLK_SRC_PLL_AUTO;
adau             1056 sound/soc/codecs/adau17x1.c 		ret = adau_calc_pll_cfg(clk_get_rate(adau->mclk), 48000 * 1024,
adau             1057 sound/soc/codecs/adau17x1.c 				adau->pll_regs);
adau             1061 sound/soc/codecs/adau17x1.c 		ret = clk_prepare_enable(adau->mclk);
adau             1066 sound/soc/codecs/adau17x1.c 	adau->regmap = regmap;
adau             1067 sound/soc/codecs/adau17x1.c 	adau->switch_mode = switch_mode;
adau             1068 sound/soc/codecs/adau17x1.c 	adau->type = type;
adau             1070 sound/soc/codecs/adau17x1.c 	dev_set_drvdata(dev, adau);
adau             1073 sound/soc/codecs/adau17x1.c 		if (adau17x1_has_safeload(adau)) {
adau             1074 sound/soc/codecs/adau17x1.c 			adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap,
adau             1077 sound/soc/codecs/adau17x1.c 			adau->sigmadsp = devm_sigmadsp_init_regmap(dev, regmap,
adau             1080 sound/soc/codecs/adau17x1.c 		if (IS_ERR(adau->sigmadsp)) {
adau             1082 sound/soc/codecs/adau17x1.c 				PTR_ERR(adau->sigmadsp));
adau             1083 sound/soc/codecs/adau17x1.c 			adau->sigmadsp = NULL;
adau             1096 sound/soc/codecs/adau17x1.c 	struct adau *adau = dev_get_drvdata(dev);
adau             1098 sound/soc/codecs/adau17x1.c 	if (adau->mclk)
adau             1099 sound/soc/codecs/adau17x1.c 		clk_disable_unprepare(adau->mclk);