[alsa-devel] [ASoC] bug in soc_pcm_open
Nobin Mathew
nobin.mathew at gmail.com
Mon Jun 11 22:44:49 CEST 2007
Seems like a problem,
Adding to that
if (machine->ops && machine->ops->shutdown)
machine->ops->shutdown(substream);
if (platform->pcm_ops->close)
platform->pcm_ops->close(substream);
if (cpu_dai->ops.shutdown)
cpu_dai->ops.shutdown(substream);
if it is a error condition then above functions are called twice (also
in snd_codec_close())
Nobin Mathew
On 6/11/07, Matthieu CASTET <matthieu.castet at parrot.com> wrote:
> Hi,
>
> it seems there is a bug in soc_pcm_open. In some case [1] we are in a error
> path, but we don't set the ret return value.
>
> This cause bug/crash from alsa core.
>
> Thanks
>
> Matthieu
>
>
>
> [1]http://hg-mirror.alsa-project.org/alsa-kernel/file/38926de0e79c/soc/soc-core.c
> if (!runtime->hw.rates) {
>
> 218 printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
>
> 219 codec_dai->name, cpu_dai->name);
>
> 220 goto machine_err;
>
> 221 }
>
> 222 if (!runtime->hw.formats) {
>
> 223 printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",
>
> 224 codec_dai->name, cpu_dai->name);
>
> 225 goto machine_err;
>
> 226 }
>
> 227 if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
>
> 228 printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
>
> 229 codec_dai->name, cpu_dai->name);
>
> 230 goto machine_err;
>
> 231 }
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
More information about the Alsa-devel
mailing list