[Sound-open-firmware] [PATCH 1/3] DAI: Check DAI type in dai_get() in APL platform

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed May 9 20:50:28 CEST 2018


On Wed, 2018-05-09 at 09:33 +0300, Seppo Ingalsuo wrote:
> Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo at linux.intel.com>
> ---
>  src/platform/apollolake/dai.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/platform/apollolake/dai.c b/src/platform/apollolake/dai.c
> index 7e5da44..42d7393 100644
> --- a/src/platform/apollolake/dai.c
> +++ b/src/platform/apollolake/dai.c
> @@ -150,9 +150,13 @@ struct dai *dai_get(uint32_t type, uint32_t index)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(ssp); i++) {
> -		if (ssp[i].type == type && ssp[i].index == index)
> -			return &ssp[i];
> +	if (type == SOF_DAI_INTEL_SSP) {
> +		for (i = 0; i < ARRAY_SIZE(ssp); i++) {
> +			if (ssp[i].type == type && ssp[i].index == index)
> +				return &ssp[i];
> +		}
> +	}
> +
>  	}
>  
>  	return NULL;

All applied and fixed a build error.

Liam



More information about the Sound-open-firmware mailing list