platform/kernel/linux-starfive.git
3 years agoASoC: ab8500: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:56:00 +0000 (13:56 +0900)]
ASoC: ab8500: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0sen6tl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: lochnagar-sc: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:56 +0000 (13:55 +0900)]
ASoC: lochnagar-sc: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfcun6tp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mt6660: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:51 +0000 (13:55 +0900)]
ASoC: mt6660: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtxan6tt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mc13783: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:47 +0000 (13:55 +0900)]
ASoC: mc13783: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8hqn6ty.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sgtl5000: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:40 +0000 (13:55 +0900)]
ASoC: sgtl5000: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pn26n6u4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ssm2602: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:34 +0000 (13:55 +0900)]
ASoC: ssm2602: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1mmn6ub.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: zl38060: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:29 +0000 (13:55 +0900)]
ASoC: zl38060: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg72n6ug.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sunxi: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:25 +0000 (13:55 +0900)]
ASoC: sunxi: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87turin6uk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: jz4740: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:20 +0000 (13:55 +0900)]
ASoC: jz4740: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9byn6uo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: adau*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:55:01 +0000 (13:55 +0900)]
ASoC: adau*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnwen6v8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ak*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:56 +0000 (13:54 +0900)]
ASoC: ak*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2gun6vc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tscs*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:52 +0000 (13:54 +0900)]
ASoC: tscs*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh1an6vh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: cs*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:48 +0000 (13:54 +0900)]
ASoC: cs*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871remolg1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: max*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:44 +0000 (13:54 +0900)]
ASoC: max*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735z2olg5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: es*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:39 +0000 (13:54 +0900)]
ASoC: es*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kjiolga.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: da*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:33 +0000 (13:54 +0900)]
ASoC: da*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875z3yolgf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tas*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:29 +0000 (13:54 +0900)]
ASoC: tas*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877doeolgk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: nau*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:25 +0000 (13:54 +0900)]
ASoC: nau*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878s8uolgo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rt*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:21 +0000 (13:54 +0900)]
ASoC: rt*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6taolgs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tlv*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:17 +0000 (13:54 +0900)]
ASoC: tlv*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bldqolgw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm*: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:13 +0000 (13:54 +0900)]
ASoC: wm*: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czy6olh0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:08 +0000 (13:54 +0900)]
ASoC: fsl: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeimolh5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:54:03 +0000 (13:54 +0900)]
ASoC: mediatek: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ft32olha.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: pxa: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:58 +0000 (13:53 +0900)]
ASoC: pxa: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7niolhf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: ti: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:53 +0000 (13:53 +0900)]
ASoC: ti: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im7yolhk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sh: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:49 +0000 (13:53 +0900)]
ASoC: sh: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0seolho.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: samsung: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:43 +0000 (13:53 +0900)]
ASoC: samsung: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfcuolhu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: rockchip: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:38 +0000 (13:53 +0900)]
ASoC: rockchip: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtxaolhz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:33 +0000 (13:53 +0900)]
ASoC: tegra: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8hqoli4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: cirrus: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:29 +0000 (13:53 +0900)]
ASoC: cirrus: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pn26oli8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: bcm: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:23 +0000 (13:53 +0900)]
ASoC: bcm: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1mmolie.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: au1x: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:18 +0000 (13:53 +0900)]
ASoC: au1x: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg72olij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:13 +0000 (13:53 +0900)]
ASoC: atmel: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87turiolio.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: adi: sync parameter naming (rate/sample_bits)
Kuninori Morimoto [Fri, 15 Jan 2021 04:53:00 +0000 (13:53 +0900)]
ASoC: adi: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9byolj1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: sync parameter naming : rate / sample_bits
Kuninori Morimoto [Fri, 15 Jan 2021 04:52:54 +0000 (13:52 +0900)]
ASoC: sync parameter naming : rate / sample_bits

snd_pcm_runtime / snd_soc_dai / snd_soc_dai_driver / snd_soc_dai_link
have related parameter which is similar but not same naming.

struct snd_pcm_runtime {
...
(A) unsigned int rate;
...
(B) unsigned int sample_bits;
...
};

struct snd_soc_dai {
...
(A) unsigned int rate;
(B) unsigned int sample_bits;
...
};

struct snd_soc_dai_driver {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};

struct snd_soc_dai_link {
...
(A) unsigned int symmetric_rates:1;
(B) unsigned int symmetric_samplebits:1;
...
};

Because it is similar but not same naming rule,
code can be verbose / can't share macro.

This patch sync naming rule for framework.
- xxx_rates;
+ xxx_rate;

- xxx_samplebits;
+ xxx_sample_bits;

old name will be removed if all drivers were switched
to new naming rule.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnweolj6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: revert soc_pcm_apply_symmetry()
Kuninori Morimoto [Fri, 15 Jan 2021 04:52:38 +0000 (13:52 +0900)]
ASoC: soc-pcm: revert soc_pcm_apply_symmetry()

commit a39748d03cbc ("ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()")
was applied by miscommunication.
To more cleanup code, and to be easy review, this patch reverts it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2guoljm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: mediatek: mt8192-mt6359: support DP audio" from Tzung-Bi Shih...
Mark Brown [Thu, 21 Jan 2021 00:00:58 +0000 (00:00 +0000)]
Merge series "ASoC: mediatek: mt8192-mt6359: support DP audio" from Tzung-Bi Shih <tzungbi@google.com>:

The 1st and 2nd patches refactor the machine driver.

The 3rd patch changes the platform driver to support TDM 8 channel output.

The 4th patch adds an optional DT property.

The 5th patch makes the machine driver support DP audio if the optional DT
property is specified.

Tzung-Bi Shih (5):
  ASoC: mediatek: mt8192-mt6359: move headset_jack to card specific data
  ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init
  ASoC: mediatek: mt8192: change mclk_multiple of TDM from 128 to 512
  ASoC: dt-bindings: mt8192-mt6359: add hdmi-codec property
  ASoC: mediatek: mt8192-mt6359: support audio over DP

 .../sound/mt8192-mt6359-rt1015-rt5682.yaml    |  5 ++
 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c    |  2 +-
 .../mt8192/mt8192-mt6359-rt1015-rt5682.c      | 54 ++++++++++++++++---
 3 files changed, 52 insertions(+), 9 deletions(-)

--
2.30.0.284.gd98b1dd5eaa7-goog

3 years agoMerge series "ASoC: remove obsolete drivers" from Arnd Bergmann <arnd@kernel.org>
Mark Brown [Thu, 21 Jan 2021 00:00:56 +0000 (00:00 +0000)]
Merge series "ASoC: remove obsolete drivers" from Arnd Bergmann <arnd@>
Arnd Bergmann <arnd@arndb.de>:

From: Arnd Bergmann <arnd@arndb.de>

A few Arm platforms are getting removed in v5.12, this removes
the corresponding sound drivers.

Link: https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-arnd@kernel.org/T/
Arnd Bergmann (2):
  ASoC: remove sirf prima/atlas drivers
  ASoC: remove zte zx drivers

 .../bindings/sound/sirf-audio-codec.txt       |  17 -
 .../devicetree/bindings/sound/sirf-usp.txt    |  27 -
 .../devicetree/bindings/sound/zte,tdm.txt     |  30 -
 .../bindings/sound/zte,zx-aud96p22.txt        |  24 -
 .../devicetree/bindings/sound/zte,zx-i2s.txt  |  45 --
 .../bindings/sound/zte,zx-spdif.txt           |  27 -
 sound/soc/Kconfig                             |   2 -
 sound/soc/Makefile                            |   2 -
 sound/soc/codecs/Makefile                     |   4 -
 sound/soc/codecs/sirf-audio-codec.c           | 575 ------------------
 sound/soc/codecs/zx_aud96p22.c                | 401 ------------
 sound/soc/sirf/Kconfig                        |  21 -
 sound/soc/sirf/Makefile                       |   8 -
 sound/soc/sirf/sirf-audio-port.c              |  86 ---
 sound/soc/sirf/sirf-audio.c                   | 160 -----
 sound/soc/sirf/sirf-usp.c                     | 435 -------------
 sound/soc/sirf/sirf-usp.h                     | 292 ---------
 sound/soc/zte/Kconfig                         |  26 -
 sound/soc/zte/Makefile                        |   4 -
 sound/soc/zte/zx-i2s.c                        | 452 --------------
 sound/soc/zte/zx-spdif.c                      | 363 -----------
 sound/soc/zte/zx-tdm.c                        | 458 --------------
 22 files changed, 3459 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt
 delete mode 100644 Documentation/devicetree/bindings/sound/sirf-usp.txt
 delete mode 100644 Documentation/devicetree/bindings/sound/zte,tdm.txt
 delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-aud96p22.txt
 delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
 delete mode 100644 Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
 delete mode 100644 sound/soc/codecs/sirf-audio-codec.c
 delete mode 100644 sound/soc/codecs/zx_aud96p22.c
 delete mode 100644 sound/soc/sirf/Kconfig
 delete mode 100644 sound/soc/sirf/Makefile
 delete mode 100644 sound/soc/sirf/sirf-audio-port.c
 delete mode 100644 sound/soc/sirf/sirf-audio.c
 delete mode 100644 sound/soc/sirf/sirf-usp.c
 delete mode 100644 sound/soc/sirf/sirf-usp.h
 delete mode 100644 sound/soc/zte/Kconfig
 delete mode 100644 sound/soc/zte/Makefile
 delete mode 100644 sound/soc/zte/zx-i2s.c
 delete mode 100644 sound/soc/zte/zx-spdif.c
 delete mode 100644 sound/soc/zte/zx-tdm.c

--
2.29.2

3 years agoASoC: remove zte zx drivers
Arnd Bergmann [Wed, 20 Jan 2021 16:25:53 +0000 (17:25 +0100)]
ASoC: remove zte zx drivers

The zte zx platform is getting removed, so this driver is no
longer needed.

Cc: Jun Nie <jun.nie@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210120162553.21666-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: remove sirf prima/atlas drivers
Arnd Bergmann [Wed, 20 Jan 2021 16:25:52 +0000 (17:25 +0100)]
ASoC: remove sirf prima/atlas drivers

The CSR SiRF prima2/atlas platforms are getting removed, so this driver
is no longer needed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Barry Song <baohua@kernel.org>
Link: https://lore.kernel.org/r/20210120162553.21666-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_spdif: Remove of_device_get_match_data() error check
Fabio Estevam [Mon, 18 Jan 2021 12:38:15 +0000 (09:38 -0300)]
ASoC: fsl_spdif: Remove of_device_get_match_data() error check

The only way this driver can be probed is via devicetree, which always
provides driver data.

Remove the unneeded of_device_get_match_data() error check, as it
can never fail.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_esai: Remove of_device_get_match_data() error check
Fabio Estevam [Mon, 18 Jan 2021 12:38:14 +0000 (09:38 -0300)]
ASoC: fsl_esai: Remove of_device_get_match_data() error check

The only way this driver can be probed is via devicetree, which always
provides driver data.

Remove the unneeded of_device_get_match_data() error check, as it
can never fail.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_asrc: Remove of_device_get_match_data() error check
Fabio Estevam [Mon, 18 Jan 2021 12:38:13 +0000 (09:38 -0300)]
ASoC: fsl_asrc: Remove of_device_get_match_data() error check

The only way this driver can be probed is via devicetree, which always
provides driver data.

Remove the unneeded of_device_get_match_data() error check, as it
can never fail.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_xcvr: Remove unused of_id variable
Fabio Estevam [Mon, 18 Jan 2021 12:38:12 +0000 (09:38 -0300)]
ASoC: fsl_xcvr: Remove unused of_id variable

The of_id variable is not used, so just remove it.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_micfil: Use of_device_get_match_data()
Fabio Estevam [Mon, 18 Jan 2021 12:38:11 +0000 (09:38 -0300)]
ASoC: fsl_micfil: Use of_device_get_match_data()

The retrieval of driver data via of_device_get_match_data() can make
the code simpler.

Use of_device_get_match_data() to simplify the code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: fsl_ssi: Use of_device_get_match_data()
Fabio Estevam [Mon, 18 Jan 2021 12:38:10 +0000 (09:38 -0300)]
ASoC: fsl_ssi: Use of_device_get_match_data()

The retrieval of driver data via of_device_get_match_data() can make
the code simpler.

Use of_device_get_match_data() to simplify the code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8192-mt6359: support audio over DP
Tzung-Bi Shih [Wed, 20 Jan 2021 08:08:50 +0000 (16:08 +0800)]
ASoC: mediatek: mt8192-mt6359: support audio over DP

If the DTS property is specified, the DP bridge should populate a
"hdmi-codec" platform device (sound/soc/codecs/hdmi-codec.c).

The "hdmi-codec" device is the communication relayer between the ASoC
machine driver and the DP bridge.  For example:
- Notifies DP bridge when setting hw_param.
- Notifies ASoC when jack detection events.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210120080850.699354-6-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: mt8192-mt6359: add hdmi-codec property
Tzung-Bi Shih [Wed, 20 Jan 2021 08:08:49 +0000 (16:08 +0800)]
ASoC: dt-bindings: mt8192-mt6359: add hdmi-codec property

Adds optional property "hdmi-codec".

If specified, the machine driver should:
- Exposes a device that can write audio data to the DP bridge.
- Detects jack plug events.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210120080850.699354-5-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8192: change mclk_multiple of TDM from 128 to 512
Tzung-Bi Shih [Wed, 20 Jan 2021 08:08:48 +0000 (16:08 +0800)]
ASoC: mediatek: mt8192: change mclk_multiple of TDM from 128 to 512

mclk = rate * mclk_multiple
bclk = rate * channel * sample_width

If TDM outputs 8 channels and 32 bits, bclk will be greater than mclk.

Changes the ratio from 128 to 512.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210120080850.699354-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init
Tzung-Bi Shih [Wed, 20 Jan 2021 08:08:47 +0000 (16:08 +0800)]
ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init

Returns snd_soc_component_set_jack() directly in mt8192_rt5682_init.
No need to have another block to check the return value.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210120080850.699354-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: mediatek: mt8192-mt6359: move headset_jack to card specific data
Tzung-Bi Shih [Wed, 20 Jan 2021 08:08:46 +0000 (16:08 +0800)]
ASoC: mediatek: mt8192-mt6359: move headset_jack to card specific data

Moves headset_jack to card specific data.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210120080850.699354-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "Tegra210 audio graph card" from Sameer Pujar <spujar@nvidia.com>:
Mark Brown [Tue, 19 Jan 2021 16:20:13 +0000 (16:20 +0000)]
Merge series "Tegra210 audio graph card" from Sameer Pujar <spujar@nvidia.com>:

This series adds audio graph based sound card support for Tegra210
platforms like Jetson-TX1 an Jetson-Nano. The following preparatory
audio graph enhancement series is already merged.
 * https://patchwork.kernel.org/project/alsa-devel/list/?series=375629&state=*

Following are the summary of changes:
 * Add graph/audio-graph based schemas or schema updates for Tegra210
   component and machine drivers.
 * Add Tegra audio graph machine driver.
 * Add required DT support for Jetson-TX1/Nano.

This work is based on earlier discussion of DPCM usage for Tegra
and simple card driver updates.
 * https://lkml.org/lkml/2020/4/30/519
 * https://lkml.org/lkml/2020/6/27/4

Original v6 series was sent about 6-7 weeks back. The dependency commit,
https://lore.kernel.org/alsa-devel/1610948585-16286-1-git-send-email-spujar@nvidia.com/
is now merged. Resending this now to appear in the top of the mail list.

Changelog
=========

v5 -> v6
--------
 * Added ports or port description in YAML docs for Tegra AHUB
   devices and graph card in patch 1/6 and 2/6. Reference of
   audio-graph-port.yaml is used for AHUB devices.
 * Dropped redundant NULL check return for of_device_get_match_data()
   in patch 3/6.
 * Added 'Reviewed-by' tag from Jon Hunter.
 * No changes in remaining patches.

v4 -> v5
--------
 * Audio graph related changes were sent in separate v5 series as
   mentioned above and are dropped from current series.
 * Graph and audio graph doc patches are dropped from this series
   and are sent separately as mentioned above.
 * Minor change with phandle label for TX1 and Nano platform DT files.
 * No changes in other patches.

v3 -> v4
--------
 * Added new patches to convert graph.txt and audio-graph-card.txt
   to corresponding json-schema files. Later these references
   are used in Tegra audio graph schema.

 * AHUB component binding docs are updated to reflect the usage
   of ports/port/endpoint

 * More common stuff is moved into graph_parse_of() and this is
   used by both generic and Tegra audio graph.

 * DT binding for Tegra audio graph is updated to included "ports { }"

 * As per the suggestion 'void *data' member is dropped from
   'asoc_simple_priv' and instead container method is used to
   maintain required custom data internal to Tegra audio graph.

v2 -> v3
--------
 * Dropped new compatible addition in generic graph driver
   after reviewing it with Morimoto-san. Instead added Tegra
   audio graph driver and new compatibles are added in the same.
 * Added new patches to expose new members for customization
   in audio graph driver.
 * Added new patch for Tegra audio graph driver and related
   documentation.
 * Minor change in below commit where mutex version of helper is used
   "ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM"
 * DT binding is updated to use the newly exposed compatibles
 * No changes in other patches

v1 -> v2
--------
 * Re-organized ports/endpoints description for ADMAIF and XBAR.
   Updated DT patches accordingly.
 * After above change, multiple Codec endpoint support is not
   required and hence dropped for now. This will be considered
   separately if at all required in future.
 * Re-ordered patches in the series.

Sameer Pujar (6):
  ASoC: dt-bindings: tegra: Add graph bindings
  ASoC: dt-bindings: tegra: Add json-schema for Tegra audio graph card
  ASoC: tegra: Add audio graph based card driver
  arm64: defconfig: Enable Tegra audio graph card driver
  arm64: tegra: Audio graph header for Tegra210
  arm64: tegra: Audio graph sound card for Jetson Nano and TX1

 .../sound/nvidia,tegra-audio-graph-card.yaml       | 187 +++++++++++++++
 .../bindings/sound/nvidia,tegra186-dspk.yaml       |  18 +-
 .../bindings/sound/nvidia,tegra210-admaif.yaml     |  13 +-
 .../bindings/sound/nvidia,tegra210-ahub.yaml       |  13 +-
 .../bindings/sound/nvidia,tegra210-dmic.yaml       |  18 +-
 .../bindings/sound/nvidia,tegra210-i2s.yaml        |  18 +-
 .../boot/dts/nvidia/tegra210-audio-graph.dtsi      | 153 ++++++++++++
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 262 +++++++++++++++++++++
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 146 ++++++++++++
 arch/arm64/configs/defconfig                       |   1 +
 sound/soc/tegra/Kconfig                            |   9 +
 sound/soc/tegra/Makefile                           |   2 +
 sound/soc/tegra/tegra_audio_graph_card.c           | 251 ++++++++++++++++++++
 13 files changed, 1085 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-graph-card.yaml
 create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-audio-graph.dtsi
 create mode 100644 sound/soc/tegra/tegra_audio_graph_card.c

--
2.7.4

3 years agoMerge series "ASoC: Simplify with dma_set_mask_and_coherent()" from Takashi Iwai...
Mark Brown [Tue, 19 Jan 2021 16:20:12 +0000 (16:20 +0000)]
Merge series "ASoC: Simplify with dma_set_mask_and_coherent()" from Takashi Iwai <tiwai@suse.de>:

Simple conversions from two dma_set_mask*() calls into the single
dma_set_mask_and_coherent().

Just a minor code refactoring, no functional changes.

Takashi

===

Takashi Iwai (3):
  ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()
  ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()
  ASoC: tegra: Simplify with dma_set_mask_and_coherent()

 sound/soc/intel/skylake/skl.c | 8 ++------
 sound/soc/sof/intel/hda.c     | 8 ++------
 sound/soc/tegra/tegra_pcm.c   | 6 +-----
 3 files changed, 5 insertions(+), 17 deletions(-)

--
2.26.2

3 years agoASoC: cpcap: Implement set_tdm_slot for voice call support
Tony Lindgren [Tue, 12 Jan 2021 17:47:04 +0000 (18:47 +0100)]
ASoC: cpcap: Implement set_tdm_slot for voice call support

ASoC: cpcap: Implement set_tdm_slot for voice call support

For using cpcap for voice calls, we need to route audio directly from
the modem to cpcap for TDM (Time Division Multiplexing). The voice call
is direct data between the modem and cpcap with no CPU involvment. In
this mode, the cpcap related audio mixer controls work for the speaker
selection and volume though.

To do this, we need to implement standard snd_soc_dai_set_tdm_slot()
for cpcap. Then the modem codec driver can use snd_soc_dai_set_sysclk(),
snd_soc_dai_set_fmt(), and snd_soc_dai_set_tdm_slot() to configure a
voice call.

Let's add cpcap_voice_set_tdm_slot() for this, and cpcap_voice_call()
helper to configure the additional registers needed for voice call.

Let's also clear CPCAP_REG_VAUDIOC on init in case we have the bit for
CPCAP_BIT_VAUDIO_MODE0 set on init.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20210112174704.GA13496@duo.ucw.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: cros_ec_codec: Reset I2S RX when probing
Yu-Hsuan Hsu [Fri, 15 Jan 2021 07:53:01 +0000 (15:53 +0800)]
ASoC: cros_ec_codec: Reset I2S RX when probing

It is not guaranteed that I2S RX is disabled when the kernel booting.
For example, if the kernel crashes while it is enabled, it will keep
enabled until the next time EC reboots. Reset I2S RX when probing to
fix this issue.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210115075301.47995-2-yuhsuan@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agocros_ec_commands: Add EC_CODEC_I2S_RX_RESET
Yu-Hsuan Hsu [Fri, 15 Jan 2021 07:53:00 +0000 (15:53 +0800)]
cros_ec_commands: Add EC_CODEC_I2S_RX_RESET

Add the new command EC_CODEC_I2S_RX_RESET in ec_codec_i2s_rx_subcmd,
which is used for resetting the EC codec.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210115075301.47995-1-yuhsuan@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Add audio graph based card driver
Sameer Pujar [Tue, 19 Jan 2021 09:28:13 +0000 (14:58 +0530)]
ASoC: tegra: Add audio graph based card driver

Add Tegra audio machine driver which is based on generic audio graph card
driver. It re-uses most of the common stuff from audio graph driver and
uses the same DT binding. Required Tegra specific customizations are done
in the driver and additional DT bindings are required for clock handling.

Details on the customizations done:

 - Update PLL rates at runtime: Tegra HW supports multiple sample rates
   (multiples of 8x and 11.025x) and both of these groups require different
   PLL rates. Hence there is a requirement to update this at runtime.
   This is achieved by providing a custom 'snd_soc_ops' and in hw_param()
   callback PLL rate is updated as per the sample rate.

 - Internal structure 'tegra_audio_graph_data' is used to maintain clock
   handles of PLL.

 - The 'force_dpcm' flag is set to use DPCM for all DAI links.

 - The 'component_chaining' flag is set to use DPCM with component model.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/1611048496-24650-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: tegra: Add json-schema for Tegra audio graph card
Sameer Pujar [Tue, 19 Jan 2021 09:28:12 +0000 (14:58 +0530)]
ASoC: dt-bindings: tegra: Add json-schema for Tegra audio graph card

Add YAML schema for Tegra audio graph sound card DT bindings. It uses the
same DT bindings provided by generic audio graph driver. Along with this
few standard clock DT bindings are added which are specifically required
for Tegra audio.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/1611048496-24650-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: dt-bindings: tegra: Add graph bindings
Sameer Pujar [Tue, 19 Jan 2021 09:28:11 +0000 (14:58 +0530)]
ASoC: dt-bindings: tegra: Add graph bindings

Add device tree binding properties of generic graph to ASoC component
devices. This allows to define audio ports out of these components or
DAIs and audio graph based sound card can be realised with this.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/1611048496-24650-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: tegra: Simplify with dma_set_mask_and_coherent()
Takashi Iwai [Thu, 14 Jan 2021 13:33:37 +0000 (14:33 +0100)]
ASoC: tegra: Simplify with dma_set_mask_and_coherent()

ASoC tegra PCM code still has explicit calls of dma_set_mask() and
dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()
Takashi Iwai [Thu, 14 Jan 2021 13:33:36 +0000 (14:33 +0100)]
ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()

ASoC Intel SOF driver still has explicit calls of dma_set_mask() and
dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel: skl: Simplify with dma_set_mask_and_coherent()
Takashi Iwai [Thu, 14 Jan 2021 13:33:35 +0000 (14:33 +0100)]
ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()

ASoC Intel Skylake driver still has explicit calls of dma_set_mask()
and dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: Intel: initial support to AlderLake-P
Kai Vehmanen [Thu, 14 Jan 2021 11:55:58 +0000 (13:55 +0200)]
ASoC: SOF: Intel: initial support to AlderLake-P

Add PCI id for the AlderLake-P.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210114115558.52699-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: audio-graph-card: Drop remote-endpoint as required property
Sameer Pujar [Mon, 18 Jan 2021 05:43:05 +0000 (11:13 +0530)]
ASoC: audio-graph-card: Drop remote-endpoint as required property

The remote-endpoint may not be available if it is part of some
pluggable module. One such example would be an audio card, the
Codec endpoint will not be available until it is plugged in.
Hence drop 'remote-endpoint' as a required property.

Cc: Rob Herring <robh@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1610948585-16286-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: intel, keembay-i2s: Fix dt binding errors
Michael Sit Wei Hong [Mon, 18 Jan 2021 10:27:06 +0000 (18:27 +0800)]
ASoC: intel, keembay-i2s: Fix dt binding errors

Fix devicetree binding errors caused by newly added parameters

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Link: https://lore.kernel.org/r/20210118102706.6125-1-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC/SoundWire: fix timeout values" from Bard Liao <yung-chuan.liao...
Mark Brown [Fri, 15 Jan 2021 17:13:13 +0000 (17:13 +0000)]
Merge series "ASoC/SoundWire: fix timeout values" from Bard Liao <yung-chuan.liao@linux.intel.com>:

The timeout for an individual transaction w/ the Cadence IP is the same as
the entire resume operation for codecs.
This doesn't make sense, we need to have at least one order of magnitude
between individual transactions and the entire resume operation.

Set the timeout on the Cadence side to 500ms and 5s for the codec resume.

Both ASoC and SoundWire trees are fine for this series.

Pierre-Louis Bossart (2):
  ASoC: codecs: soundwire: increase resume timeout
  soundwire: cadence: reduce timeout on transactions

 drivers/soundwire/cadence_master.c | 2 +-
 sound/soc/codecs/max98373-sdw.c    | 4 +++-
 sound/soc/codecs/rt1308-sdw.c      | 2 +-
 sound/soc/codecs/rt5682.h          | 2 +-
 sound/soc/codecs/rt700-sdw.c       | 2 +-
 sound/soc/codecs/rt711-sdw.c       | 2 +-
 sound/soc/codecs/rt715-sdw.c       | 2 +-
 7 files changed, 9 insertions(+), 7 deletions(-)

--
2.17.1

3 years agoMerge series "ASoC: qcom: Minor code cleanups for lpass-cpu" from Stephen Boyd <swboy...
Mark Brown [Fri, 15 Jan 2021 17:13:12 +0000 (17:13 +0000)]
Merge series "ASoC: qcom: Minor code cleanups for lpass-cpu" from Stephen Boyd <swboyd@chromium.org>:

Here's some minor code cleanups for the lpass-cpu driver. I noticed that
it casts away const from the driver data from DT. That's not great but
fixing it is a little more involved. I'll get to it later. There's also
some questionable clk_get() usage that should probably be
clk_get_optional(). For now this should help a little.

Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Stephen Boyd (4):
  ASoC: qcom: Remove useless debug print
  ASoC: qcom: Add some names to regmap configs
  ASoC: qcom: Stop casting away __iomem for error pointers
  ASoC: qcom: Remove duplicate error messages on ioremap

 sound/soc/qcom/lpass-cpu.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e
--
https://chromeos.dev

3 years agoASoC: codecs: soundwire: increase resume timeout
Pierre-Louis Bossart [Fri, 15 Jan 2021 06:16:50 +0000 (14:16 +0800)]
ASoC: codecs: soundwire: increase resume timeout

The resume operation relies on multiple transactions to synchronize
the regmap state, make sure the timeout is one order of magnitude
larger than an individual transaction, so that timeouts of failed
transactions are detected first.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Remove duplicate error messages on ioremap
Stephen Boyd [Fri, 15 Jan 2021 03:43:27 +0000 (19:43 -0800)]
ASoC: qcom: Remove duplicate error messages on ioremap

We don't need to print an error message when these ioremap operations
fail. The function that returns an error already prints an error message
and properly attributes it to the device. Drop them to save some code.

Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210115034327.617223-5-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Stop casting away __iomem for error pointers
Stephen Boyd [Fri, 15 Jan 2021 03:43:26 +0000 (19:43 -0800)]
ASoC: qcom: Stop casting away __iomem for error pointers

We don't need to cast away __iomem when testing with IS_ERR() or
converting with PTR_ERR(). Modern sparse can handle this just fine.
Drop it.

Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210115034327.617223-4-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Add some names to regmap configs
Stephen Boyd [Fri, 15 Jan 2021 03:43:25 +0000 (19:43 -0800)]
ASoC: qcom: Add some names to regmap configs

This device can sometimes have multiple regmaps. Let's add a name so
that we can differentiate in debugfs more easily.

Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210115034327.617223-3-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: Remove useless debug print
Stephen Boyd [Fri, 15 Jan 2021 03:43:24 +0000 (19:43 -0800)]
ASoC: qcom: Remove useless debug print

This looks like a left over debug print that tells us that HDMI is
enabled. Let's remove it as that's definitely not an error to have HDMI
enabled.

Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Cc: Srinivasa Rao <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210115034327.617223-2-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge v5.11-rc3
Mark Brown [Wed, 13 Jan 2021 17:56:59 +0000 (17:56 +0000)]
Merge v5.11-rc3

3 years agoASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callback
Keyon Jie [Wed, 13 Jan 2021 15:26:17 +0000 (17:26 +0200)]
ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callback

Invoke hda_dsp_remove() as the .shutdown() callback. This will help to
perform shutdown of the DSP safely on TGL platforms before shutting down
or rebooting the system.

BugLink: https://github.com/thesofproject/linux/issues/2571
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210113152617.4048541-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: sof-pci-dev: add .shutdown() callback
Keyon Jie [Wed, 13 Jan 2021 15:26:16 +0000 (17:26 +0200)]
ASoC: SOF: sof-pci-dev: add .shutdown() callback

Add the .shutdown() callback to the sof-pci-dev driver, to help to
handle shutting down specific tasks for SOF PCI platforms.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210113152617.4048541-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: add snd_sof_device_shutdown() helper for shutdown
Keyon Jie [Wed, 13 Jan 2021 15:26:15 +0000 (17:26 +0200)]
ASoC: SOF: add snd_sof_device_shutdown() helper for shutdown

Add helper snd_sof_device_shutdown() to wrap the platform specific
.shutdown callbacks for SOF platforms.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210113152617.4048541-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: SOF: add .shutdown() callback to snd_sof_dsp_ops
Keyon Jie [Wed, 13 Jan 2021 15:26:14 +0000 (17:26 +0200)]
ASoC: SOF: add .shutdown() callback to snd_sof_dsp_ops

Add .shutdown() callback to the struct snd_sof_dsp_ops, for
doing platform specific actions at shutdown.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210113152617.4048541-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: soc-pcm: cleanup code" from Kuninori Morimoto <kuninori.morimoto...
Mark Brown [Wed, 13 Jan 2021 15:24:15 +0000 (15:24 +0000)]
Merge series "ASoC: soc-pcm: cleanup code" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

These are not so important, but for
soc-pcm cleanup patches.

Kuninori Morimoto (6):
  ASoC: soc-pcm: move dpcm_set_fe_update_state()
  ASoC: soc-pcm: add dpcm_set_be_update_state()
  ASoC: soc-pcm: add soc_pcm_set_dai_params()
  ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()
  ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()
  ASoC: soc-pcm: setup pcm at one place in soc_new_pcm()

 sound/soc/soc-pcm.c | 231 +++++++++++++++++---------------------------
 1 file changed, 90 insertions(+), 141 deletions(-)

--
2.25.1

Thank you for your help !!

Best regards
---
Kuninori Morimoto

3 years agoASoC: kirkwood: Use managed DMA buffer allocation
Lars-Peter Clausen [Wed, 6 Jan 2021 13:36:50 +0000 (14:36 +0100)]
ASoC: kirkwood: Use managed DMA buffer allocation

Instead of manually managing its DMA buffers using
dma_{alloc,free}_coherent() lets the sound core take care of this using
managed buffers.

On one hand this reduces the amount of boiler plate code, but the main
motivation for the change is to use the shared code where possible. This
makes it easier to argue about correctness and that the code does not
contain subtle bugs like data leakage or similar.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210106133650.13509-3-lars@metafoo.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: bcm: cygnus: Use managed DMA buffer allocation
Lars-Peter Clausen [Wed, 6 Jan 2021 13:36:49 +0000 (14:36 +0100)]
ASoC: bcm: cygnus: Use managed DMA buffer allocation

Instead of manually managing its DMA buffers using
dma_{alloc,free}_coherent() lets the sound core take care of this using
managed buffers.

On one hand this reduces the amount of boiler plate code, but the main
motivation for the change is to use the shared code where possible. This
makes it easier to argue about correctness and that the code does not
contain subtle bugs like data leakage or similar.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210106133650.13509-2-lars@metafoo.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: atmel-pdc: Use managed DMA buffer allocation
Lars-Peter Clausen [Wed, 6 Jan 2021 13:36:48 +0000 (14:36 +0100)]
ASoC: atmel-pdc: Use managed DMA buffer allocation

Instead of manually managing its DMA buffers using
dma_{alloc,free}_coherent() lets the sound core take care of this using
managed buffers.

On one hand this reduces the amount of boiler plate code, but the main
motivation for the change is to use the shared code where possible. This
makes it easier to argue about correctness and that the code does not
contain subtle bugs like data leakage or similar.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20210106133650.13509-1-lars@metafoo.de
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai
Stephan Gerhold [Fri, 11 Dec 2020 20:32:55 +0000 (21:32 +0100)]
ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai

At the moment it is necessary to set up the DAPM routes between
front-end AIF<->DAI explicitly in the device tree, e.g. using

audio-routing =
"MM_DL1", "MultiMedia1 Playback",
"MM_DL3", "MultiMedia3 Playback",
"MM_DL4", "MultiMedia4 Playback",
"MultiMedia2 Capture", "MM_UL2";

This is prone to mistakes and (sadly) there is no clear error if one
of these routes is missing. :(

Actually, this should not be necessary because the ASoC core normally
automatically links AIF<->DAI within snd_soc_dapm_link_dai_widgets().
This is done using the "stname" parameter of SND_SOC_DAPM_AIF_IN/OUT.

For SND_SOC_DAPM_AIF_IN("MM_DL1", "MultiMedia1 Playback", 0, 0, 0, 0),
it should create the route from above: MM_DL1 <-> MultiMedia1 Playback.

This does not work at the moment because the AIF widget (MM_DL1)
and the DAI widget (MultiMedia1 Playback) belong to different
DAPM contexts (q6routing / q6asm-dai).

Fix this by declaring the AIF widgets in the same driver as the DAIs
(q6asm-dai). Now the routes above are created automatically
and no longer need to be specified in the device tree.

This is also more consistent with the back-end AIFs which are already
declared in q6afe-dais instead of q6routing. q6routing should only link
the components together using mixers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20201211203255.148246-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: cs42l56: fix up error handling in probe
Dan Carpenter [Fri, 11 Dec 2020 10:07:59 +0000 (13:07 +0300)]
ASoC: cs42l56: fix up error handling in probe

There are two issues with this code.  The first error path forgot to set
the error code and instead returns success.  The second error path
doesn't clean up.

Fixes: 272b5edd3b8f ("ASoC: Add support for CS42L56 CODEC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X9NE/9nK9/TuxuL+@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()
Kuninori Morimoto [Fri, 11 Dec 2020 05:55:33 +0000 (14:55 +0900)]
ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()

soc_pcm_apply_symmetry() want to call snd_pcm_hw_constraint_single()
for rate/channel/sample_bits, but, it needs many condition check.
These are very similar but different, thus, it needs to have very
verbose code.
This patch use macro for it and make code more simple.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wnxo7uyq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: add soc_pcm_set_dai_params()
Kuninori Morimoto [Fri, 11 Dec 2020 05:55:27 +0000 (14:55 +0900)]
ASoC: soc-pcm: add soc_pcm_set_dai_params()

Getting rate/channels/sample_bits from param needs fixed method.
This patch adds new soc_pcm_set_dai_params() and replace existing code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2i47uyw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: add dpcm_set_be_update_state()
Kuninori Morimoto [Fri, 11 Dec 2020 05:55:22 +0000 (14:55 +0900)]
ASoC: soc-pcm: add dpcm_set_be_update_state()

soc-pcm has dpcm_set_fe_update_state() to update FE's runtime_update
(except dpcm_fe_dai_do_trigger() which needs to update it without it).
OTOH, it doesn't have BE's update function.

O: dpcm_set_fe_update_state()
X: dpcm_set_be_update_state()

This patch add BE's dpcm_set_fe_update_state()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh2k7uz1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: move dpcm_set_fe_update_state()
Kuninori Morimoto [Fri, 11 Dec 2020 05:55:16 +0000 (14:55 +0900)]
ASoC: soc-pcm: move dpcm_set_fe_update_state()

This patch moves dpcm_set_fe_update_state() to top side.
This is prepare for cleanup soc-pcm.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871rfw99jn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: Intel: bytcr_rt5640: Add support for devices with only a headphon...
Mark Brown [Tue, 12 Jan 2021 16:40:28 +0000 (16:40 +0000)]
Merge series "ASoC: Intel: bytcr_rt5640: Add support for devices with only a headphone jack (no speakers/mic)" from Hans de Goede <hdegoede@redhat.com>:

Hi All,

This series adds support for devices with only a headphone jack
(no speakers/internal mic). Specifically this adds support for the
Mele PCG03 Mini PC. But the new no-speakers and no-internal-mic quirks
will likely be useful on other devices too.

Regards,

Hans

3 years agoASoC: SOF: add mutex to protect the dsp_power_state access
Keyon Jie [Tue, 5 Jan 2021 15:56:40 +0000 (17:56 +0200)]
ASoC: SOF: add mutex to protect the dsp_power_state access

There could be more than one thread read/write the dsp_power_state
simultaneously (e.g. hda_dsp_d0i3_work and sof_ipc_tx_message), add a
mutex power_state_access to make sure the access to it is mutually
exclusive.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210105155640.3725238-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect()
Hans de Goede [Tue, 12 Jan 2021 10:17:25 +0000 (11:17 +0100)]
ASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect()

sound/soc/soc-core.c: soc_remove_component() unconditionally calls
snd_soc_component_set_jack(component, NULL, NULL); on any components
being removed.

This means that on machines where the machine-driver does not provide
a jack through snd_soc_component_set_jack() es8316_disable_jack_detect()
will still get called and at this time es8316->jack will be NULL and
the es8316->jack->status check in es8316_disable_jack_detect() will
lead to a NULL pointer deref.

Fix this by checking for es8316->jack bein NULL at the start of
es8316_disable_jack_detect() and turn the function into a no-op in
that case.

Cc: russianneuromancer <russianneuromancer@ya.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210112101725.44200-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: adau17x1: Remove redundant null check before clk_disable_unprepare
Xu Wang [Fri, 8 Jan 2021 08:44:56 +0000 (08:44 +0000)]
ASoC: adau17x1: Remove redundant null check before clk_disable_unprepare

Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20210108084456.6603-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: cht_bsw_nau8824: Move snd_soc_dai_set_tdm_slot call to cht_codec_fixup
Hans de Goede [Thu, 7 Jan 2021 11:53:24 +0000 (12:53 +0100)]
ASoC: Intel: cht_bsw_nau8824: Move snd_soc_dai_set_tdm_slot call to cht_codec_fixup

Move the snd_soc_dai_set_tdm_slot() call from cht_codec_init() to
cht_codec_fixup(). There are 2 reasons for doing this:

1. This aligns the cht_bsw_nau8824 with all the other BYT/CHT machine
drivers which also do this from their codec_fixup function.

2. When using the SOF driver, things like the TDM info is set from the
topology file. Moving the call to the codec_fixup function, which gets
skipped when using the SOF driver avoids the call interfering with the
settings when using the SOF driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210107115324.11602-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PC
Hans de Goede [Sat, 9 Jan 2021 21:01:19 +0000 (22:01 +0100)]
ASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PC

Add a quirk for the Mele PCG03 Mini PC, being a Mini PC this device
has no speakers and no internal microphone.

To make matters worse the speaker output pins are shorted (to gnd or
to each other?) and SPKVDD is provided. So trying to output sound on the
speakers leads to shorting SPKVDD, this leads to a power dip after
which the codec is an unknown state. Sometimes it drops of the i2c
bus, sometimes it does still respond to i2c transfers, but is otherwise
not functional. TL;DR: trying to use the speaker outputs on this model
is BAD.

Besides not having speakers / an internal mic, this is a Bay Trail CR
device without a CHAN package in ACPI, so we default to SSP0-AIF2 as
codec connection. But the device is actually using SSP0-AIF1, so we
need to quirk that too.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping
Hans de Goede [Sat, 9 Jan 2021 21:01:18 +0000 (22:01 +0100)]
ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping

Some devices, like mini PCs/media/top-set boxes do not have an internal
microphone at all, an example of the is the Mele PCG03 Mini PC.

Add a new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping for this,
which does not add any internal-mic routes and modifies the components
and the (optional) long_name strings to reflect this.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flag
Hans de Goede [Sat, 9 Jan 2021 21:01:17 +0000 (22:01 +0100)]
ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flag

Some devices, like mini PCs/media/top-set boxes do not have any speakers
at all, an example of the is the Mele PCG03 Mini PC.

Add a new BYT_RT5640_NO_SPEAKERS quirk-flag which when sets does not add
speaker routes and modifies the components and the (optional) long_name
strings to reflect that there are no speakers.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoMerge series "ASoC: rt5645: Enable internal mic and headset on ECS EF20" from Chris...
Mark Brown [Mon, 11 Jan 2021 16:22:26 +0000 (16:22 +0000)]
Merge series "ASoC: rt5645: Enable internal mic and headset on ECS EF20" from Chris Chiu <chiu@endlessos.org>:

These patches are trying to fix the jack detection and internal
microphone problems on ECS EF20 series laptops which are empowered
by Intel Atom x5-Z8350 CPU (CherryTrail) with Realtek rt5645 audio
codec.

---
  v2 -> v3:
Restore the accidentally removed terminator of the
dmi_platform_data[].

  v1 -> v2:
        Invoke callback() of the DMI quirk if it exists, because
        the dmi_first_match() doesn't.
---

Chris Chiu (4):
  ASoC: rt5645: Introduce mapping for ACPI-defined GPIO
  ASoC: rt5645: Add ACPI-defined GPIO for ECS EF20 series
  ASoC: rt5645: add inv_hp_det flag
  ASoC: rt5645: Enable internal microphone and JD on ECS EF20

 include/sound/rt5645.h    |  2 ++
 sound/soc/codecs/rt5645.c | 45 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

--
2.20.1

3 years agoMerge series "Enable DMA mode on Intel Keem Bay platform" from Michael Sit Wei Hong...
Mark Brown [Mon, 11 Jan 2021 16:22:25 +0000 (16:22 +0000)]
Merge series "Enable DMA mode on Intel Keem Bay platform" from Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>:

v2: Update patch to align with latest kernel release.
v1: Initial patch version, to enable DMA mode on Intel Keembay platform.

Michael Sit Wei Hong (2):
  dt-bindings: sound: intel, keembay-i2s: Add info for device to use DMA
  ASoC: Intel: KMB: Enable DMA transfer mode

 .../bindings/sound/intel,keembay-i2s.yaml     |  14 ++
 sound/soc/intel/Kconfig                       |   2 +
 sound/soc/intel/keembay/kmb_platform.c        | 157 ++++++++++++++++--
 sound/soc/intel/keembay/kmb_platform.h        |   9 +
 4 files changed, 167 insertions(+), 15 deletions(-)

--
2.17.1

3 years agoASoC: soc-pcm: Fix an uninitialized error code
Dan Carpenter [Mon, 11 Jan 2021 09:50:21 +0000 (12:50 +0300)]
ASoC: soc-pcm: Fix an uninitialized error code

The error path here doesn't set "ret" so it returns uninitialized data
instead of a negative error code.

Fixes: 2c1382840c19 ("ASoC: soc-pcm: disconnect BEs if the FE is not ready")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X/wfXQFxeMLvpO+1@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: wm_adsp: Fix uninitialized variable warnings
Richard Fitzgerald [Mon, 11 Jan 2021 13:38:25 +0000 (13:38 +0000)]
ASoC: wm_adsp: Fix uninitialized variable warnings

wm_adsp_read_data_word() used if (ret) to check for an error from
wm_adsp_read_raw_data_block(). While this is perfectly valid,
wm_adsp_read_raw_data_block() itself uses if (ret < 0) and three
calls to wm_adsp_read_data_word() also use if (ret < 0).

This creates an error check chain like this:

  1st) if (ret < 0) return ret;
  2nd) if (ret) return ret;
  3rd) if (ret < 0) ...

This can confuse the compiler into thinking that there are possible
returns > 0 from the middle if() that are not handled by the final
if(). If this was true it would lead to using uninitialized variables
later in the outer function.

Fix this by changing the test in wm_adsp_read_data_word() to be
if (ret < 0).

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210111133825.8758-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoASoC: soc-pcm: return correct -ERRNO in failure path
Souptick Joarder [Sat, 9 Jan 2021 03:45:01 +0000 (09:15 +0530)]
ASoC: soc-pcm: return correct -ERRNO in failure path

Kernel test robot throws below error ->

sound/soc/soc-pcm.c:2523 dpcm_run_update_startup() error: uninitialized
symbol 'ret'.

Initializing ret = 0 and returning correct -ERRNO in failure path.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Link: https://lore.kernel.org/r/1610163901-5523-1-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>