diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-10-25 11:08:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-25 15:22:48 -0400 |
commit | cdaf9af1eaeb539e32bfd6da6310b41ad6c3ba23 (patch) | |
tree | 6a092f2420a2e71716bc129a5e54784116ddd472 | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) |
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>
-rw-r--r-- | sound/soc/samsung/dmaengine.c | 8 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/s3c2412-i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/samsung/s3c24xx-i2s.c | 2 |
4 files changed, 2 insertions, 13 deletions
diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c index 9104c98deeb7..cda656e4afc6 100644 --- a/sound/soc/samsung/dmaengine.c +++ b/sound/soc/samsung/dmaengine.c | |||
@@ -37,12 +37,8 @@ int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter, | |||
37 | pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; | 37 | pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; |
38 | pcm_conf->compat_filter_fn = filter; | 38 | pcm_conf->compat_filter_fn = filter; |
39 | 39 | ||
40 | if (dev->of_node) { | 40 | pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; |
41 | pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx; | 41 | pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx; |
42 | pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx; | ||
43 | } else { | ||
44 | flags |= SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME; | ||
45 | } | ||
46 | 42 | ||
47 | return devm_snd_dmaengine_pcm_register(dev, pcm_conf, flags); | 43 | return devm_snd_dmaengine_pcm_register(dev, pcm_conf, flags); |
48 | } | 44 | } |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 7e32cf4581f8..7a9ee48a5c04 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -1304,8 +1304,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1304 | } | 1304 | } |
1305 | pri_dai->dma_playback.addr = regs_base + I2STXD; | 1305 | pri_dai->dma_playback.addr = regs_base + I2STXD; |
1306 | pri_dai->dma_capture.addr = regs_base + I2SRXD; | 1306 | pri_dai->dma_capture.addr = regs_base + I2SRXD; |
1307 | pri_dai->dma_playback.chan_name = "tx"; | ||
1308 | pri_dai->dma_capture.chan_name = "rx"; | ||
1309 | pri_dai->dma_playback.addr_width = 4; | 1307 | pri_dai->dma_playback.addr_width = 4; |
1310 | pri_dai->dma_capture.addr_width = 4; | 1308 | pri_dai->dma_capture.addr_width = 4; |
1311 | pri_dai->quirks = quirks; | 1309 | pri_dai->quirks = quirks; |
@@ -1325,7 +1323,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) | |||
1325 | sec_dai->lock = &pri_dai->spinlock; | 1323 | sec_dai->lock = &pri_dai->spinlock; |
1326 | sec_dai->variant_regs = pri_dai->variant_regs; | 1324 | sec_dai->variant_regs = pri_dai->variant_regs; |
1327 | sec_dai->dma_playback.addr = regs_base + I2STXDS; | 1325 | sec_dai->dma_playback.addr = regs_base + I2STXDS; |
1328 | sec_dai->dma_playback.chan_name = "tx-sec"; | ||
1329 | 1326 | ||
1330 | if (!np) { | 1327 | if (!np) { |
1331 | sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; | 1328 | sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; |
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 3e89fbc0c51d..40331a060a02 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c | |||
@@ -35,12 +35,10 @@ | |||
35 | #include <linux/platform_data/asoc-s3c.h> | 35 | #include <linux/platform_data/asoc-s3c.h> |
36 | 36 | ||
37 | static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = { | 37 | static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_out = { |
38 | .chan_name = "tx", | ||
39 | .addr_width = 4, | 38 | .addr_width = 4, |
40 | }; | 39 | }; |
41 | 40 | ||
42 | static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = { | 41 | static struct snd_dmaengine_dai_dma_data s3c2412_i2s_pcm_stereo_in = { |
43 | .chan_name = "rx", | ||
44 | .addr_width = 4, | 42 | .addr_width = 4, |
45 | }; | 43 | }; |
46 | 44 | ||
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index c78a936a3099..d59a47d8ca0f 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c | |||
@@ -33,12 +33,10 @@ | |||
33 | #include <linux/platform_data/asoc-s3c.h> | 33 | #include <linux/platform_data/asoc-s3c.h> |
34 | 34 | ||
35 | static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = { | 35 | static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_out = { |
36 | .chan_name = "tx", | ||
37 | .addr_width = 2, | 36 | .addr_width = 2, |
38 | }; | 37 | }; |
39 | 38 | ||
40 | static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = { | 39 | static struct snd_dmaengine_dai_dma_data s3c24xx_i2s_pcm_stereo_in = { |
41 | .chan_name = "rx", | ||
42 | .addr_width = 2, | 40 | .addr_width = 2, |
43 | }; | 41 | }; |
44 | 42 | ||