ASoC: dwc: I2S Controller instance param added
PATCH v2 1/1 ASoC: dwc: I2S Controller instance param added
When multiple I2S controller instances created, i2s_instance parameter refers to i2s controller instance value.
Signed-off-by Vijendar Mukunda <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
---v1->v2: defined I2S instance macros in designware header file
include/sound/designware_i2s.h | 6 ++++++ sound/soc/dwc/dwc-i2s.c | 1 + sound/soc/dwc/local.h | 1 + 3 files changed, 8 insertions(+)
include/sound/designware_i2s.h +6 -0
@@ -44,6 +44,10 @@ struct i2s_platform_data {int channel;u32 snd_fmts;u32 snd_rates; +/* i2s_instance parameter returns I2S controller instance value +* when multiple I2S controllers instantiated +*/ +u32 i2s_instance;#define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0)#define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1)
@@ -74,5 +78,7 @@ struct i2s_dma_data {#define FOUR_CHANNEL_SUPPORT 4/* up to 3.1 */ #define SIX_CHANNEL_SUPPORT 6/* up to 5.1 */ #define EIGHT_CHANNEL_SUPPORT 8/* up to 7.1 */ +#define I2S_SP_INSTANCE 1 +#define I2S_BT_INSTANCE 2#endif /* __SOUND_DESIGNWARE_I2S_H */
sound/soc/dwc/dwc-i2s.c +1 -0
@@ -549,6 +549,7 @@ static int dw_configure_dai_by_pd(struct dw_i2s_dev *dev,if (dev->quirks &DW_I2S_QUIRK_16BIT_IDX_OVERRIDE ) idx =1 ; + dev->i2s_instance = pdata->i2s_instance;/* Set DMA slaves info */ dev->play_dma_data.pd.data = pdata->play_dma_data; dev->capture_dma_data.pd.data = pdata->capture_dma_data;
sound/soc/dwc/local.h +1 -0
@@ -98,6 +98,7 @@ struct dw_i2s_dev {u32 ccr;u32 xfer_resolution;u32 fifo_th; +u32 i2s_instance;/* data related to DMA transfers b/w i2s and DMAC */ union dw_i2s_snd_dma_data play_dma_data;
Signature · 1 line
2.7.4
Quoted 53 lines · Vijendar Mukunda
When multiple I2S controller instances created,
i2s_instanceparameter refers to i2s controller instance value.Signed-off-by Vijendar Mukunda <[email protected]>Reviewed-by Alex Deucher <[email protected]>---
v1->v2: defined I2S instance macros in designware header fileinclude/sound/designware_i2s.h | 6 ++++++ sound/soc/dwc/dwc-i2s.c | 1 + sound/soc/dwc/local.h | 1 + 3 files changed, 8 insertions(+)include/sound/designware_i2s.h +6
-0@@ -44,6 +44,10 @@ struct i2s_platform_data {int channel;u32 snd_fmts;u32 snd_rates; +/* i2s_instance parameter returns I2S controller instance value +* when multiple I2S controllers instantiated +*/ +u32 i2s_instance;#define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0)#define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1)@@ -74,5 +78,7 @@ struct i2s_dma_data {#define FOUR_CHANNEL_SUPPORT 4/* up to 3.1 */ #define SIX_CHANNEL_SUPPORT 6/* up to 5.1 */ #define EIGHT_CHANNEL_SUPPORT 8/* up to 7.1 */ +#define I2S_SP_INSTANCE 1 +#define I2S_BT_INSTANCE 2#endif /* __SOUND_DESIGNWARE_I2S_H */ sound/soc/dwc/dwc-i2s.c +1
-0@@ -549,6 +549,7 @@ static int dw_configure_dai_by_pd(struct dw_i2s_dev *dev,if (dev->quirks &DW_I2S_QUIRK_16BIT_IDX_OVERRIDE ) idx =1 ; + dev->i2s_instance = pdata->i2s_instance;/* Set DMA slaves info */ dev->play_dma_data.pd.data = pdata->play_dma_data; dev->capture_dma_data.pd.data = pdata->capture_dma_data;sound/soc/dwc/local.h +0
-0
sound/soc/dwc/local.h struct dw_i2s_dev { · line 104
Quoted 7 lines
sound/soc/dwc/local.h +1
-0@@ -98,6 +98,7 @@ struct dw_i2s_dev {u32 ccr;u32 xfer_resolution;u32 fifo_th; +u32 i2s_instance;/* data related to DMA transfers b/w i2s and DMAC */ union dw_i2s_snd_dma_data play_dma_data;
Hi Mark,
Could you please review the patch.
Thanks,
Vijendar