Re: [PATCH v3 4/8] ASoC: wm_adsp: Add support for opening a compressed stream

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

 



On Wed, Dec 23, 2015 at 10:00:44AM +0000, Charles Keepax wrote:
> On Wed, Dec 23, 2015 at 12:14:56AM +0000, Mark Brown wrote:
> > On Tue, Dec 15, 2015 at 11:29:45AM +0000, Charles Keepax wrote:
> > 
> > > +int wm_adsp_compr_open(struct wm_adsp *dsp, struct snd_compr_stream *stream)
> > > +{
> > > +	struct wm_adsp_compr *compr;
> > > +	int ret = 0;
> > > +
> > > +	mutex_lock(&dsp->pwr_lock);
> > > +
> > > +	if (wm_adsp_fw[dsp->fw].num_caps == 0) {
> > > +		adsp_err(dsp, "Firmware does not support compressed API\n");
> > > +		ret = -ENXIO;
> > > +		goto out;
> > > +	}
> > > +
> > > +	if (wm_adsp_fw[dsp->fw].compr_direction != stream->direction) {
> > > +		adsp_err(dsp, "Firmware does not support stream direction\n");
> > > +		ret = -EINVAL;
> > > +		goto out;
> > > +	}
> > > +
> > > +	compr = kzalloc(sizeof(*compr), GFP_KERNEL);
> > 
> > You're doing this under lock but not checking for an attempt to allocate
> > on a DSP already in use.
> 
> A check does actually get added later in:
> 
> ASoC: wm_adsp: Attach buffers and streams together
> 
> I think that is really just a bit of a rebasing messup. I will
> pull that forward into this patch for the next spin.

Oops.. missed you had applied it anyway. Thanks, will fix up the
comments on the last patch and resend today.

Thanks,
Charles
_______________________________________________
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