From 3b9219021d10b4517dee0f859f0ae53e4f646fcd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 14 Apr 2020 10:36:52 +0200 Subject: [PATCH] 4.4-stable patches added patches: asoc-dapm-connect-virtual-mux-with-default-value.patch asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch asoc-fix-regwmask.patch asoc-topology-use-name_prefix-for-new-kcontrol.patch --- ...nnect-virtual-mux-with-default-value.patch | 44 +++++++++++++++++ ...art-or-stop-during-pause-for-backend.patch | 49 +++++++++++++++++++ queue-4.4/asoc-fix-regwmask.patch | 43 ++++++++++++++++ ...ogy-use-name_prefix-for-new-kcontrol.patch | 31 ++++++++++++ queue-4.4/series | 4 ++ 5 files changed, 171 insertions(+) create mode 100644 queue-4.4/asoc-dapm-connect-virtual-mux-with-default-value.patch create mode 100644 queue-4.4/asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch create mode 100644 queue-4.4/asoc-fix-regwmask.patch create mode 100644 queue-4.4/asoc-topology-use-name_prefix-for-new-kcontrol.patch diff --git a/queue-4.4/asoc-dapm-connect-virtual-mux-with-default-value.patch b/queue-4.4/asoc-dapm-connect-virtual-mux-with-default-value.patch new file mode 100644 index 00000000000..3291a4d288b --- /dev/null +++ b/queue-4.4/asoc-dapm-connect-virtual-mux-with-default-value.patch @@ -0,0 +1,44 @@ +From 3bbbb7728fc853d71dbce4073fef9f281fbfb4dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=ED=83=9D?= +Date: Tue, 31 Mar 2020 16:55:16 +0900 +Subject: ASoC: dapm: connect virtual mux with default value + +From: 이경택 + +commit 3bbbb7728fc853d71dbce4073fef9f281fbfb4dd upstream. + +Since a virtual mixer has no backing registers +to decide which path to connect, +it will try to match with initial state. +This is to ensure that the default mixer choice will be +correctly powered up during initialization. +Invert flag is used to select initial state of the virtual switch. +Since actual hardware can't be disconnected by virtual switch, +connected is better choice as initial state in many cases. + +Signed-off-by: Gyeongtaek Lee +Link: https://lore.kernel.org/r/01a301d60731$b724ea10$256ebe30$@samsung.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-dapm.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -751,7 +751,13 @@ static void dapm_set_mixer_path_status(s + val = max - val; + p->connect = !!val; + } else { +- p->connect = 0; ++ /* since a virtual mixer has no backing registers to ++ * decide which path to connect, it will try to match ++ * with initial state. This is to ensure ++ * that the default mixer choice will be ++ * correctly powered up during initialization. ++ */ ++ p->connect = invert; + } + } + diff --git a/queue-4.4/asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch b/queue-4.4/asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch new file mode 100644 index 00000000000..116889c1410 --- /dev/null +++ b/queue-4.4/asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch @@ -0,0 +1,49 @@ +From 21fca8bdbb64df1297e8c65a746c4c9f4a689751 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=ED=83=9D?= +Date: Wed, 1 Apr 2020 10:04:21 +0900 +Subject: ASoC: dpcm: allow start or stop during pause for backend + +From: 이경택 + +commit 21fca8bdbb64df1297e8c65a746c4c9f4a689751 upstream. + +soc_compr_trigger_fe() allows start or stop after pause_push. +In dpcm_be_dai_trigger(), however, only pause_release is allowed +command after pause_push. +So, start or stop after pause in compress offload is always +returned as error if the compress offload is used with dpcm. +To fix the problem, SND_SOC_DPCM_STATE_PAUSED should be allowed +for start or stop command. + +Signed-off-by: Gyeongtaek Lee +Reviewed-by: Vinod Koul +Link: https://lore.kernel.org/r/004d01d607c1$7a3d5250$6eb7f6f0$@samsung.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-pcm.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/sound/soc/soc-pcm.c ++++ b/sound/soc/soc-pcm.c +@@ -1951,7 +1951,8 @@ int dpcm_be_dai_trigger(struct snd_soc_p + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && +- (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) ++ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && ++ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) + continue; + + ret = dpcm_do_trigger(dpcm, be_substream, cmd); +@@ -1981,7 +1982,8 @@ int dpcm_be_dai_trigger(struct snd_soc_p + be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; + break; + case SNDRV_PCM_TRIGGER_STOP: +- if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) ++ if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && ++ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) + continue; + + if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) diff --git a/queue-4.4/asoc-fix-regwmask.patch b/queue-4.4/asoc-fix-regwmask.patch new file mode 100644 index 00000000000..64b46a6f92a --- /dev/null +++ b/queue-4.4/asoc-fix-regwmask.patch @@ -0,0 +1,43 @@ +From 0ab070917afdc93670c2d0ea02ab6defb6246a7c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=ED=83=9D?= +Date: Mon, 30 Mar 2020 16:35:59 +0900 +Subject: ASoC: fix regwmask + +From: 이경택 + +commit 0ab070917afdc93670c2d0ea02ab6defb6246a7c upstream. + +If regwshift is 32 and the selected architecture compiles '<<' operator +for signed int literal into rotating shift, '1< +Link: https://lore.kernel.org/r/001001d60665$db7af3e0$9270dba0$@samsung.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-ops.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/soc-ops.c ++++ b/sound/soc/soc-ops.c +@@ -837,7 +837,7 @@ int snd_soc_get_xr_sx(struct snd_kcontro + unsigned int regbase = mc->regbase; + unsigned int regcount = mc->regcount; + unsigned int regwshift = component->val_bytes * BITS_PER_BYTE; +- unsigned int regwmask = (1<invert; + unsigned long mask = (1UL<nbits)-1; + long min = mc->min; +@@ -886,7 +886,7 @@ int snd_soc_put_xr_sx(struct snd_kcontro + unsigned int regbase = mc->regbase; + unsigned int regcount = mc->regcount; + unsigned int regwshift = component->val_bytes * BITS_PER_BYTE; +- unsigned int regwmask = (1<invert; + unsigned long mask = (1UL<nbits)-1; + long max = mc->max; diff --git a/queue-4.4/asoc-topology-use-name_prefix-for-new-kcontrol.patch b/queue-4.4/asoc-topology-use-name_prefix-for-new-kcontrol.patch new file mode 100644 index 00000000000..848da21d261 --- /dev/null +++ b/queue-4.4/asoc-topology-use-name_prefix-for-new-kcontrol.patch @@ -0,0 +1,31 @@ +From abca9e4a04fbe9c6df4d48ca7517e1611812af25 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=ED=83=9D?= +Date: Wed, 1 Apr 2020 18:05:24 +0900 +Subject: ASoC: topology: use name_prefix for new kcontrol + +From: 이경택 + +commit abca9e4a04fbe9c6df4d48ca7517e1611812af25 upstream. + +Current topology doesn't add prefix of component to new kcontrol. + +Signed-off-by: Gyeongtaek Lee +Link: https://lore.kernel.org/r/009b01d60804$ae25c2d0$0a714870$@samsung.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-topology.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/soc-topology.c ++++ b/sound/soc/soc-topology.c +@@ -378,7 +378,7 @@ static int soc_tplg_add_kcontrol(struct + struct snd_soc_component *comp = tplg->comp; + + return soc_tplg_add_dcontrol(comp->card->snd_card, +- comp->dev, k, NULL, comp, kcontrol); ++ comp->dev, k, comp->name_prefix, comp, kcontrol); + } + + /* remove a mixer kcontrol */ diff --git a/queue-4.4/series b/queue-4.4/series index aade4355342..9a7cccadbec 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -11,3 +11,7 @@ locking-lockdep-avoid-recursion-in-lockdep_count_-fo.patch btrfs-remove-a-bug_on-from-merge_reloc_roots.patch btrfs-track-reloc-roots-based-on-their-commit-root-b.patch misc-rtsx-set-correct-pcr_ops-for-rts522a.patch +asoc-fix-regwmask.patch +asoc-dapm-connect-virtual-mux-with-default-value.patch +asoc-dpcm-allow-start-or-stop-during-pause-for-backend.patch +asoc-topology-use-name_prefix-for-new-kcontrol.patch -- 2.47.3