[alsa-devel] [PATCH 3/6] ASoC: Intel: Skylake: Add functions for DSP module configuration
Vinod Koul
vinod.koul at intel.com
Wed Jul 29 18:50:29 CEST 2015
On Wed, Jul 29, 2015 at 01:33:23PM +0100, Mark Brown wrote:
> On Tue, Jul 21, 2015 at 11:53:57PM +0530, Vinod Koul wrote:
>
> > + case SKL_CH_CFG_I2S_DUAL_STEREO_1:
> > + config = (0xFFFF00FF | (SKL_CHANNEL_LEFT << 8)
> > + | (SKL_CHANNEL_RIGHT << 12));
> > + break;
> > +
> > + default:
> > + config = 0xFFFFFFFF;
> > + }
>
> Missing break.
Should default have one always :)
>
> > +/*
> > + * Allocates queue for each module.
> > + * if dynamic, the pin_index is allocated 0 to max_pin.
> > + * In static, the pin_index is fixed based on module_id and instance id
> > + */
> > +static int skl_alloc_queue(struct skl_module_pin *mpin,
> > + struct skl_module_inst_id id, int max)
> > +{
> > + struct skl_module_pin m_pin = skl_get_queue(mpin, id, max);
> > +
> > + if (m_pin.pin_index < 0)
> > + return -EINVAL;
> > +
> > + if (m_pin.is_dynamic) {
> > + m_pin.in_use = true;
> > + m_pin.id.module_id = id.module_id;
> > + m_pin.id.instance_id = id.instance_id;
> > + }
>
> Double indentation here. It's really unclear to me why a static pin
> doesn't need to get merked as in use?
Oops, will fix
In static pin case, the pins come from topology binary where these are fixed
for a configuration, so don't need to be allocated thus marked and hence
freed.
--
~Vinod
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150729/7f48bb61/attachment.sig>
More information about the Alsa-devel
mailing list