]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: AMD: Added asic_type as ACP DMA driver platform data
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Mon, 9 Oct 2017 20:36:08 +0000 (16:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Oct 2017 14:56:26 +0000 (10:56 -0400)
asic_type information is passed to ACP DMA Driver as platform data.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
sound/soc/amd/acp-pcm-dma.c
sound/soc/amd/acp.h

index 08b1399d1da2b818b997b752555532ebdf45312e..dcbf9973884d9eaf7db31ea62976d4fa4017ecab 100644 (file)
@@ -73,12 +73,6 @@ static const struct snd_pcm_hardware acp_pcm_hardware_capture = {
        .periods_max = CAPTURE_MAX_NUM_PERIODS,
 };
 
-struct audio_drv_data {
-       struct snd_pcm_substream *play_stream;
-       struct snd_pcm_substream *capture_stream;
-       void __iomem *acp_mmio;
-};
-
 static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg)
 {
        return readl(acp_mmio + (reg * 4));
@@ -916,6 +910,7 @@ static int acp_audio_probe(struct platform_device *pdev)
        int status;
        struct audio_drv_data *audio_drv_data;
        struct resource *res;
+       const u32 *pdata = pdev->dev.platform_data;
 
        audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data),
                                        GFP_KERNEL);
@@ -932,6 +927,7 @@ static int acp_audio_probe(struct platform_device *pdev)
 
        audio_drv_data->play_stream = NULL;
        audio_drv_data->capture_stream = NULL;
+       audio_drv_data->asic_type =  *pdata;
 
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (!res) {
index 330832ef4e5e57e8c66114d6cc2c4773e64f7b53..28cf9140f49c7de20fad6f845888b20d608d1129 100644 (file)
@@ -84,6 +84,13 @@ struct audio_substream_data {
        void __iomem *acp_mmio;
 };
 
+struct audio_drv_data {
+       struct snd_pcm_substream *play_stream;
+       struct snd_pcm_substream *capture_stream;
+       void __iomem *acp_mmio;
+       u32 asic_type;
+};
+
 enum {
        ACP_TILE_P1 = 0,
        ACP_TILE_P2,