LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Qais Yousef <qais.yousef@imgtec.com>
Cc: alsa-devel@alsa-project.org, Vinod Koul <vinod.koul@intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: ASoC: soc-compress.c: fix NULL dereference
Date: Mon, 29 Dec 2014 16:13:03 +0000 [thread overview]
Message-ID: <20141229161303.GU17800@sirena.org.uk> (raw)
In-Reply-To: <1419325767-30602-1-git-send-email-qais.yousef@imgtec.com>
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
On Tue, Dec 23, 2014 at 09:09:27AM +0000, Qais Yousef wrote:
> In soc_new_compress() when rtd->dai_link->daynmic is set, we create the pcm
> substreams with this call:
>
> ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
> 1, 0, &be_pcm);
>
> which passes 0 as capture_count leading to
>
> be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream
>
> being NULL, hence when trying to set rtd a few lines below we get an oops.
> Fix by removing this line of code since CAPTURE substream will always be NULL.
Why will the capture stream always be NULL? There should be no
intrinsic reason why we can't have hardware support for capturing
compressed audio.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-12-29 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 9:09 Qais Yousef
2014-12-29 16:13 ` Mark Brown [this message]
2015-01-02 9:07 ` Qais Yousef
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=20141229161303.GU17800@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=qais.yousef@imgtec.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
--subject='Re: [PATCH] ALSA: ASoC: soc-compress.c: fix NULL dereference' \
/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
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).