From c7db3755cba3f26657848e70afb40bf5a3a9fb0a Mon Sep 17 00:00:00 2001 From: Soumya Managoli Date: Tue, 28 Jan 2020 11:10:37 +0530 Subject: ASoC: sdm660: Fix compilation issue of sdm660 drivers Compilation of sdm660 machine driver failed due to redefinition/incomplete definition of struct tdm_dai_data. Fix is for this compilation error. Change-Id: Icf370c42b80f63d8371063099390c857740ac0d8 Signed-off-by: Soumya Managoli --- asoc/sdm660-common.c | 23 ++++++++++++++++++++++- asoc/sdm660-external.c | 8 +------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/asoc/sdm660-common.c b/asoc/sdm660-common.c index 1fcb5b16..8d4e9f30 100644 --- a/asoc/sdm660-common.c +++ b/asoc/sdm660-common.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -45,6 +45,27 @@ enum { bool codec_reg_done; +enum { + STATUS_PORT_STARTED, /* track if AFE port has started */ + /* track AFE Tx port status for bi-directional transfers */ + STATUS_TX_PORT, + /* track AFE Rx port status for bi-directional transfers */ + STATUS_RX_PORT, + STATUS_MAX +}; + +struct tdm_dai_data { + DECLARE_BITMAP(status_mask, STATUS_MAX); + u32 rate; + u32 channels; + u32 bitwidth; + u32 num_group_ports; + u32 is_island_dai; + struct afe_clk_set clk_set; /* hold LPASS clock config. */ + union afe_port_group_config group_cfg; /* hold tdm group config */ + struct afe_tdm_port_config port_cfg; /* hold tdm config */ +}; + /* TDM default config */ static struct dev_config tdm_rx_cfg[TDM_INTERFACE_MAX][TDM_PORT_MAX] = { { /* PRI TDM */ diff --git a/asoc/sdm660-external.c b/asoc/sdm660-external.c index 8ff98edd..763a46d2 100644 --- a/asoc/sdm660-external.c +++ b/asoc/sdm660-external.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -78,12 +78,6 @@ enum { SLIM_TX_MAX, }; -struct dev_config { - u32 sample_rate; - u32 bit_format; - u32 channels; -}; - /* Default configuration of slimbus channels */ static struct dev_config slim_rx_cfg[] = { [SLIM_RX_0] = {SAMPLING_RATE_48KHZ, SNDRV_PCM_FORMAT_S16_LE, 1}, -- cgit v1.2.3