All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: fix debugfs read using path->connected
@ 2018-02-02  7:03 kaichieh.chuang
  2018-02-02 15:53 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: kaichieh.chuang @ 2018-02-02  7:03 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, chipeng.chang, garlic.tseng, srv_wsdupstream,
	shane.chien, linux-mediatek, kaichieh.chuang


[-- Attachment #1.1: Type: text/plain, Size: 2184 bytes --]

From: KaiChieh Chuang <kaichieh.chuang@mediatek.com>

This fix a bug in dapm_widget_power_read_file(),
where it may sent opposite order of source/sink widget
into the p->connected().

for example,
static int connected_check(source, sink);
{"w_sink", NULL, "w_source", connected_check}

the dapm_widget_power_read_file() will query p->connected()
in following case
        p->conneted("w_source", "w_sink")
        p->conneted("w_sink", "w_source")
we should avoid the last case, since it's the wrong order (source/sink)
as declared in snd_soc_dapm_route.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
---
 sound/soc/soc-dapm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index a10b21c..ee6d9d9a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2026,7 +2026,7 @@ static ssize_t dapm_widget_power_read_file(struct file *fi
le,
        snd_soc_dapm_for_each_direction(dir) {
                rdir = SND_SOC_DAPM_DIR_REVERSE(dir);
                snd_soc_dapm_widget_for_each_path(w, dir, p) {
-                       if (p->connected && !p->connected(w, p->node[rdir]))
+                       if (p->connected && !p->connected(p->source, p->sink))
                                continue;

                        if (!p->connect)
--
1.7.9.5


************* Email Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: dapm: fix debugfs read using path->connected
  2018-02-02  7:03 [PATCH] ASoC: dapm: fix debugfs read using path->connected kaichieh.chuang
@ 2018-02-02 15:53 ` Mark Brown
  2018-02-05  1:00   ` KaiChieh Chuang
  2018-02-05  4:56   ` KaiChieh Chuang
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2018-02-02 15:53 UTC (permalink / raw)
  To: kaichieh.chuang
  Cc: alsa-devel, chipeng.chang, garlic.tseng, srv_wsdupstream,
	shane.chien, linux-mediatek


[-- Attachment #1.1: Type: text/plain, Size: 405 bytes --]

On Fri, Feb 02, 2018 at 03:03:35PM +0800, kaichieh.chuang@mediatek.com wrote:
> From: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
> 
> This fix a bug in dapm_widget_power_read_file(),
> where it may sent opposite order of source/sink widget
> into the p->connected().

This doesn't apply against my tree or Linus' tree, can you please check
and resend?  The change itself seems to make sense.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: dapm: fix debugfs read using path->connected
  2018-02-02 15:53 ` Mark Brown
@ 2018-02-05  1:00   ` KaiChieh Chuang
  2018-02-05  4:56   ` KaiChieh Chuang
  1 sibling, 0 replies; 5+ messages in thread
From: KaiChieh Chuang @ 2018-02-05  1:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: shane.chien, alsa-devel, garlic.tseng, chipeng.chang


[-- Attachment #1.1: Type: text/plain, Size: 1883 bytes --]

On Fri, 2018-02-02 at 16:53 +0100, Mark Brown wrote:
> On Fri, Feb 02, 2018 at 03:03:35PM +0800, kaichieh.chuang@mediatek.com wrote:
> > From: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
> >
> > This fix a bug in dapm_widget_power_read_file(),
> > where it may sent opposite order of source/sink widget
> > into the p->connected().
>
> This doesn't apply against my tree or Linus' tree, can you please check
> and resend?  The change itself seems to make sense.

I can't figure out where I have do it wrong, can you help me point it
out? Thanks

this is how i get the code base:
git clone
http://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git checkout remotes/origin/for-next

HEAD commit is at
commit 56821b5652e2228ba875b72c73f4d8450b63e032
Merge: f91a4c1 0619093
Author: Mark Brown <broonie@kernel.org>
Date:   Wed Jan 31 10:42:43 2018 +0000

    Merge remote-tracking branch 'asoc/fix/mtk' into asoc-linus

which matches the tree on http
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=for-nex
t


************* Email Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: dapm: fix debugfs read using path->connected
  2018-02-02 15:53 ` Mark Brown
  2018-02-05  1:00   ` KaiChieh Chuang
@ 2018-02-05  4:56   ` KaiChieh Chuang
  2018-02-05 11:31     ` Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: KaiChieh Chuang @ 2018-02-05  4:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: shane.chien, alsa-devel, garlic.tseng, chipeng.chang

On Fri, 2018-02-02 at 16:53 +0100, Mark Brown wrote:
> 
> This doesn't apply against my tree or Linus' tree, can you please check
> and resend?  The change itself seems to make sense.

Maybe its because the "Email Confidentiality Notice" at the end?

Let me try to sent one without it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: dapm: fix debugfs read using path->connected
  2018-02-05  4:56   ` KaiChieh Chuang
@ 2018-02-05 11:31     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2018-02-05 11:31 UTC (permalink / raw)
  To: KaiChieh Chuang; +Cc: shane.chien, alsa-devel, garlic.tseng, chipeng.chang


[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]

On Mon, Feb 05, 2018 at 12:56:20PM +0800, KaiChieh Chuang wrote:
> On Fri, 2018-02-02 at 16:53 +0100, Mark Brown wrote:

> > This doesn't apply against my tree or Linus' tree, can you please check
> > and resend?  The change itself seems to make sense.

> Maybe its because the "Email Confidentiality Notice" at the end?

> Let me try to sent one without it.

Ah, that could be - or perhaps your mail system is mangling the patch so
that git and patch can't exactly understand it.  You looked to be
generating against a sensible tree based on your earlier mail so I'm
guessing it's something about it being damaged in transfer.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-05 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02  7:03 [PATCH] ASoC: dapm: fix debugfs read using path->connected kaichieh.chuang
2018-02-02 15:53 ` Mark Brown
2018-02-05  1:00   ` KaiChieh Chuang
2018-02-05  4:56   ` KaiChieh Chuang
2018-02-05 11:31     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.