alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Lai <plai@codeaurora.org>
To: lrg@slimlogic.co.uk, broonie@opensource.wolfsonmicro.com
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: Question about your DSP topic
Date: Wed, 30 Mar 2011 13:39:53 -0700	[thread overview]
Message-ID: <4D939519.6040506@codeaurora.org> (raw)
In-Reply-To: <4D2652C8.7030701@codeaurora.org>

Hi Liam/Mark,

I ran some tests on top of soc-dsp framework pulled from Liam's
topic/dsp-upstream(http://git.kernel.org/?p=linux/kernel/git/lrg/asoc-
2.6.git;a=summary). I found there is a scenario that soc-dsp framework
erroneously start pcm playabck/capture. Here is the scenario:

In the platform driver, I have this route table defined

FE1 Playback -> Mixer 1 -> BE1
BE2 -> FE1 Capture
FE = Front-end, BE = Back-end

While PCM playback is going from FE1 playback to BE1, I switch off FE1
playback to Mixer 1. This caused soc_dsp_runtime_update called.
Framework correctly close BE1 as it is no longer needed. Eventually,
framework finds BE2 is connected to FE1 capture. Framework, without
checking if FE1 capture is activated by user-space application, simply
goes ahead activate BE2. Since FE1 capture is never activated,
runtime structure is not allocated. This inherently results NULL
pointer dereference exception.

For now, in soc-dsp.c be_connect function(), I have a check to make sure
fe->dsp[stream].runtime is not NULL. I don't know if it's appropriate
fix. Can you please take a look?

Thanks
Patrick

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  parent reply	other threads:[~2011-03-30 20:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D2652C8.7030701@codeaurora.org>
2011-01-25  7:01 ` Question about your DSP topic branch Patrick Lai
2011-01-25 11:51   ` Mark Brown
2011-01-26  6:22     ` Patrick Lai
2011-01-26 11:20       ` Mark Brown
2011-01-27 21:51         ` Patrick Lai
2011-01-31 13:30           ` Mark Brown
2011-03-17  7:29             ` Patrick Lai
2011-03-17 11:57               ` Mark Brown
2011-01-25 16:46   ` Liam Girdwood
2011-01-27 23:41     ` Patrick Lai
2011-03-15  7:08       ` [alsa-devel] " Patrick Lai
2011-03-15 11:25         ` Mark Brown
2011-03-17  7:21           ` Patrick Lai
2011-03-17 23:58             ` Mark Brown
2011-03-30 20:39 ` Patrick Lai [this message]
2011-03-31  6:40   ` Patrick Lai
2011-03-31 21:35     ` Liam Girdwood
2011-03-31 21:42       ` Mark Brown
2011-03-31 22:07         ` Patrick Lai
2011-03-31 18:26   ` Question about your DSP topic Liam Girdwood
2011-03-31 20:59     ` Patrick Lai
2011-03-31 21:37       ` Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D939519.6040506@codeaurora.org \
    --to=plai@codeaurora.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).