Skip to content

Commit

Permalink
ASoC: AMD: Added asic_type as ACP DMA driver platform data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vijendar Mukunda authored and Alex Deucher committed Oct 18, 2017
1 parent 1fd16f3 commit a1b16aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sound/soc/amd/acp-pcm-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand All @@ -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) {
Expand Down
7 changes: 7 additions & 0 deletions sound/soc/amd/acp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a1b16aa

Please sign in to comment.