[alsa-devel] [PATCH RFC 2/2] ASoC: simple-card: Move dai-link level properties away from dai subnodes

Kuninori Morimoto kuninori.morimoto.gx at gmail.com
Mon Mar 24 01:05:47 CET 2014


Hi Jyri

> The properties like format, bitclock-master, frame-master,
> bitclock-inversion, and frame-inversion should be common to the dais
> connected with a dai-link. For bitclock-master and frame-master
> properties to be unambiguous they need to indicate the mastering dai
> node with a phandle.
> 
> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
(snip)
>  	/*
> -	 * bitclock-inversion, frame-inversion
> -	 * bitclock-master,    frame-master
> -	 * and specific "format" if it has
> -	 */
> -	dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
> -	dai->fmt |= daifmt;
> -
> -	/*
>  	 * dai->sysclk come from
>  	 *  "clocks = <&xxx>" (if system has common clock)
>  	 *  or "system-clock-frequency = <xxx>"

[1/2] patch exchanged snd_soc_of_parse_daifmt() parameter,
but, user code exchanged in [2/2].
It breaks git-bisect.

> +	dai_props->cpu_dai.fmt = daifmt;
> +	switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
> +	case 0x11:
> +		dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
> +		break;
> +	case 0x10:
> +		dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFM;
> +		break;
> +	case 0x01:
> +		dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFS;
> +		break;
> +	default:
> +		dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
> +		break;
> +	}

The user of snd_soc_of_parse_daifmt() is only simple-card (?)
I think SND_SOC_DAIFMT_CBxx_CFx cared by snd_soc_of_parse_daifmt() somehow
is very reasonable.


Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list