ASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_type
omap-pcm can figure out the correct dma_type based on the stream's format. In this way we can get rid of the plat/dma.h include from these drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
5a40c57af5
commit
04564e3258
|
@ -33,7 +33,6 @@
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <plat/dma.h>
|
|
||||||
|
|
||||||
#include <sound/core.h>
|
#include <sound/core.h>
|
||||||
#include <sound/pcm.h>
|
#include <sound/pcm.h>
|
||||||
|
@ -63,7 +62,6 @@ struct omap_dmic {
|
||||||
*/
|
*/
|
||||||
static struct omap_pcm_dma_data omap_dmic_dai_dma_params = {
|
static struct omap_pcm_dma_data omap_dmic_dai_dma_params = {
|
||||||
.name = "DMIC capture",
|
.name = "DMIC capture",
|
||||||
.data_type = OMAP_DMA_DATA_TYPE_S32,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
|
static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <sound/initval.h>
|
#include <sound/initval.h>
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
|
|
||||||
#include <plat/dma.h>
|
|
||||||
#include <plat/mcbsp.h>
|
#include <plat/mcbsp.h>
|
||||||
#include "mcbsp.h"
|
#include "mcbsp.h"
|
||||||
#include "omap-mcbsp.h"
|
#include "omap-mcbsp.h"
|
||||||
|
@ -234,11 +233,9 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
|
||||||
|
|
||||||
switch (params_format(params)) {
|
switch (params_format(params)) {
|
||||||
case SNDRV_PCM_FORMAT_S16_LE:
|
case SNDRV_PCM_FORMAT_S16_LE:
|
||||||
dma_data->data_type = OMAP_DMA_DATA_TYPE_S16;
|
|
||||||
wlen = 16;
|
wlen = 16;
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_FORMAT_S32_LE:
|
case SNDRV_PCM_FORMAT_S32_LE:
|
||||||
dma_data->data_type = OMAP_DMA_DATA_TYPE_S32;
|
|
||||||
wlen = 32;
|
wlen = 32;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include <sound/pcm_params.h>
|
#include <sound/pcm_params.h>
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
|
|
||||||
#include <plat/dma.h>
|
|
||||||
#include <plat/omap_hwmod.h>
|
#include <plat/omap_hwmod.h>
|
||||||
#include "omap-mcpdm.h"
|
#include "omap-mcpdm.h"
|
||||||
#include "omap-pcm.h"
|
#include "omap-pcm.h"
|
||||||
|
@ -71,11 +70,9 @@ struct omap_mcpdm {
|
||||||
static struct omap_pcm_dma_data omap_mcpdm_dai_dma_params[] = {
|
static struct omap_pcm_dma_data omap_mcpdm_dai_dma_params[] = {
|
||||||
{
|
{
|
||||||
.name = "Audio playback",
|
.name = "Audio playback",
|
||||||
.data_type = OMAP_DMA_DATA_TYPE_S32,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "Audio capture",
|
.name = "Audio capture",
|
||||||
.data_type = OMAP_DMA_DATA_TYPE_S32,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue