mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 21:04:40 +08:00
ASoC: samsung: Remove unneeded initialization of chan_name
This patch updates the I2S drivers to always use chan_names[] field of struct snd_dmaengine_pcm_config for specifying DMA channel names, rather than using struct snd_dmaengine_dai_dma_data. This allows us to subsequently drop the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag, now when the last use of that flag is removed. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1001354ca3
commit
cdaf9af1ea
@ -37,12 +37,8 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter,
|
|||||||
pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
|
pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
|
||||||
pcm_conf->compat_filter_fn = filter;
|
pcm_conf->compat_filter_fn = filter;
|
||||||
|
|
||||||
if (dev->of_node) {
|
pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx;
|
||||||
pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx;
|
pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx;
|
||||||
pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx;
|
|
||||||
} else {
|
|
||||||
flags |= SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
return devm_snd_dmaengine_pcm_register(dev, pcm_conf, flags);
|
return devm_snd_dmaengine_pcm_register(dev, pcm_conf, flags);
|
||||||
}
|
}
|
||||||
|
@ -1304,8 +1304,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
pri_dai->dma_playback.addr = regs_base + I2STXD;
|
pri_dai->dma_playback.addr = regs_base + I2STXD;
|
||||||
pri_dai->dma_capture.addr = regs_base + I2SRXD;
|
pri_dai->dma_capture.addr = regs_base + I2SRXD;
|
||||||
pri_dai->dma_playback.chan_name = "tx";
|
|
||||||
pri_dai->dma_capture.chan_name = "rx";
|
|
||||||
pri_dai->dma_playback.addr_width = 4;
|
pri_dai->dma_playback.addr_width = 4;
|
||||||
pri_dai->dma_capture.addr_width = 4;
|
pri_dai->dma_capture.addr_width = 4;
|
||||||
pri_dai->quirks = quirks;
|
pri_dai->quirks = quirks;
|
||||||
@ -1325,7 +1323,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)
|
|||||||
sec_dai->lock = &pri_dai->spinlock;
|
sec_dai->lock = &pri_dai->spinlock;
|
||||||
sec_dai->variant_regs = pri_dai->variant_regs;
|
sec_dai->variant_regs = pri_dai->variant_regs;
|
||||||
sec_dai->dma_playback.addr = regs_base + I2STXDS;
|
sec_dai->dma_playback.addr = regs_base + I2STXDS;
|
||||||
sec_dai->dma_playback.chan_name = "tx-sec";
|
|
||||||
|
|
||||||
if (!np) {
|
if (!np) {
|
||||||
sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec;
|
sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec;
|
||||||
|
@ -35,12 +35,10 @@
|
|||||||
#include <linux/platform_data/asoc-s3c.h>
|
#include <linux/platform_data/asoc-s3c.h>
|
||||||
|
|
||||||
static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = {
|
static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = {
|
||||||
.chan_name = "tx",
|
|
||||||
.addr_width = 4,
|
.addr_width = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = {
|
static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = {
|
||||||
.chan_name = "rx",
|
|
||||||
.addr_width = 4,
|
.addr_width = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,12 +33,10 @@
|
|||||||
#include <linux/platform_data/asoc-s3c.h>
|
#include <linux/platform_data/asoc-s3c.h>
|
||||||
|
|
||||||
static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = {
|
static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = {
|
||||||
.chan_name = "tx",
|
|
||||||
.addr_width = 2,
|
.addr_width = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = {
|
static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = {
|
||||||
.chan_name = "rx",
|
|
||||||
.addr_width = 2,
|
.addr_width = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user