Re: [PATCH 09/25] ASoC: soc-component: add snd_soc_component_pointer()

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

 



Hi Charles

> > +int snd_soc_component_pointer(struct snd_soc_component *component,
> > +			      struct snd_pcm_substream *substream)
> > +{
> > +	if (component->driver->ops &&
> > +	    component->driver->ops->pointer)
> > +		return component->driver->ops->pointer(substream);
> > +
> > +	return 0;
> > +}
> >
> > @@ -1115,13 +1115,10 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
> >  	for_each_rtdcom(rtd, rtdcom) {
> >  		component = rtdcom->component;
> >  
> > -		if (!component->driver->ops ||
> > -		    !component->driver->ops->pointer)
> > -			continue;
> > -
> > +		offset = snd_soc_component_pointer(component, substream);
> >  		/* FIXME: use 1st pointer */
> > -		offset = component->driver->ops->pointer(substream);
> > -		break;
> > +		if (offset > 0)
> > +			break;
> 
> This doesn't feel like it is equivalent to the previous code, is
> zero not a valid value for pointer to return?

Hmm.. indeed.
using -ENOTSUPP make sense ?


Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux