[prev in list] [next in list] [prev in thread] [next in thread] 

List:       alsa-devel
Subject:    [alsa-devel] [RFC PATCH 5/5] ASoC: omap-mcbsp: Place correct constraints for streams
From:       peter.ujfalusi () nokia ! com (Peter Ujfalusi)
Date:       2010-05-31 11:57:22
Message-ID: 201005311457.22699.peter.ujfalusi () nokia ! com
[Download RAW message or body]

On Monday 31 May 2010 13:00:21 ext Liam Girdwood wrote:

...

> > +static int hw_rule_bsize_by_channels(struct snd_pcm_hw_params *params,
> > +				    struct snd_pcm_hw_rule *rule)
> > +{
> > +	struct snd_interval *bs = hw_param_interval(params,
> > +					SNDRV_PCM_HW_PARAM_BUFFER_SIZE);
> > +	struct snd_interval *c = hw_param_interval(params,
> > +					SNDRV_PCM_HW_PARAM_CHANNELS);
> 
> Best to make these variable names more meaningful.

Sure, I can change that. I have picked these, since all code, which adds hw_rule 
(and the writing an ALSA driver manual) are using variables like this.
In Here I mean:
bs == Buffer Size
c == Channels

> 
> > +	struct omap_mcbsp_data *mcbsp_data = rule->private;
> > +	struct snd_interval frames;
> > +	int size;
> > +
> > +	snd_interval_any(&frames);
> > +	size = omap_mcbsp_get_fifo_size(mcbsp_data->bus_id);
> > +
> > +	frames.min = size / c->min;
> > +	frames.integer = 1;
> > +	return snd_interval_refine(bs, &frames);
> > +
> > +}
> > +
> > +static int hw_rule_psize_by_channels(struct snd_pcm_hw_params *params,
> > +				    struct snd_pcm_hw_rule *rule)
> > +{
> > +	struct snd_interval *ps = hw_param_interval(params,
> > +					SNDRV_PCM_HW_PARAM_PERIOD_SIZE);
> > +	struct snd_interval *c = hw_param_interval(params,
> > +					SNDRV_PCM_HW_PARAM_CHANNELS);
> 
> ditto

Same here:
I mean:
ps == Period Size
c == Channels

> 
> Thanks
> 
> Liam

Never the less, I can change them, 

Thanks,
P?ter

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic