Re: [PATCH 1/4] ASoC: makes CPU/Codec channel connection map more generic

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

 



Hi Pierre-Louis

Thank you for your review !

> We can test the next version (comments in separate mail) but we don't
> have a configuration with more cpu dais than codec dais I am afraid, so
> the best we can contribute is a non-regression for the N < M case.

Yes, it is enough. Thanks a lot !

> > + * CPU_x <---> Codec0
> > + * CPU_y <-+-> Codec1
> > + *	   \-> Codec2
> > + *
> > + *	.ch_maps is from Codec
> 
> how would we know what the convention is? Is this based on the largest
> number of dais, so here num_codecs > num_cpus so we use a codec-centric
> convention? That would be worth explaining in clear text

These samles is good enough I thought,
but yes, adding clear text is better. Will do in v2.

> > + *	.num_cpus   = 2;
> > + *	.num_codecs = 3;
> > + *	.connected_node = [x, y, y];
> > + */
> > +struct snd_soc_dai_link_ch_map {
> > +	unsigned int connected_node;
> 
> connected_node is a scalar here and an array above. maybe split this
> patch between a rename and a functionality change?

The sample image is simplified to avoid complex image.
But let's use more actual image if there is no misunderstanding.

	CPU0 <---> Codec_x
	CPU1 <-+-> Codec_y
	CPU2 <-/

	.ch_maps is from CPU

	.num_cpus   = 3;
	.num_codecs = 2;
=>	.ch_map[] = {{connected_node = x,},
	             {connected_node = y,},
	             {connected_node = y,}};


> > +#define MAX_DEFAULT_CONNECTION_MAP_SIZE 7
> 
> why 7?

No big reason, but I thought 7 is big enough as default.
We need to increase it if 7 was not enough for default.

	/* check default map size */
	if (dai_link->num_cpus   > MAX_DEFAULT_CONNECTION_MAP_SIZE ||
	    dai_link->num_codecs > MAX_DEFAULT_CONNECTION_MAP_SIZE) {
		dev_err(card->dev, "soc-core.c needs update default_connction_maps");
		return -EINVAL;
	}

> > +static struct snd_soc_dai_link_ch_map default_connction_map1[MAX_DEFAULT_CONNECTION_MAP_SIZE] = {
> 
> typo: connection

Oops, thank you for pointing it.

> > +		for (j = 0; j < n; j++)
> > +			if (dai_link->ch_maps[j].connected_node >= max) {
> > +				dev_err(card->dev, "strange connected_node (%d) was added to ch_maps",
> 
> maybe elaborate on what "strange" might mean so that average users can
> figure this out?

Thanks. Will fix in v2

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[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