[alsa-devel] [PATCH] ALSA: ASoC: soc-compress.c: fix NULL dereference
Mark Brown
broonie at kernel.org
Mon Dec 29 17:13:03 CET 2014
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20141229/e3a08b62/attachment.sig>
More information about the Alsa-devel
mailing list