Re: [ASoC] bug in soc_pcm_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-06-12 at 11:21 +0530, Nobin Mathew wrote:
> Same will cause problems in ALSA also, because nobody is checking
> whether channel_min/max is zero; it is used in pcm_native.c
> 
> http://mailman.alsa-project.org/pipermail/alsa-devel/2007-June/001400.html
> 
> 
> On 6/12/07, Nobin Mathew <nobin.mathew@xxxxxxxxx> wrote:
> > 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())
 
They should only be called once (in open()) as close() should only be
called after the device has successfully opened.

Fwiw, I placed some debug in close just to make sure nothing in the
upper layers was calling close when open failed. Everything seems to
work as expected.

Liam

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux