blob: 2a8fc08d52a173686fa9e946f2f3932179a64812 [file] [log] [blame]
Takashi Iwai2c484df2005-06-30 18:54:04 +02001/*
2 * linux/sound/arm/pxa2xx-pcm.h -- ALSA PCM interface for the Intel PXA2xx chip
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 30, 2004
6 * Copyright: MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
Eric Miaoafb5b5c2008-12-01 11:43:08 +080012#include <mach/dma.h>
Takashi Iwai2c484df2005-06-30 18:54:04 +020013
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040014struct pxa2xx_runtime_data {
15 int dma_ch;
Daniel Mackd65a1452013-08-12 10:42:39 +020016 struct snd_dmaengine_dai_dma_data *params;
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040017 pxa_dma_desc *dma_desc_array;
18 dma_addr_t dma_desc_array_phys;
Takashi Iwaid18f8372005-11-17 15:10:38 +010019};
Dmitry Baryshkova6d77312008-09-10 05:01:20 +040020
Takashi Iwaid18f8372005-11-17 15:10:38 +010021struct pxa2xx_pcm_client {
Daniel Mackd65a1452013-08-12 10:42:39 +020022 struct snd_dmaengine_dai_dma_data *playback_params;
23 struct snd_dmaengine_dai_dma_data *capture_params;
Takashi Iwaid18f8372005-11-17 15:10:38 +010024 int (*startup)(struct snd_pcm_substream *);
25 void (*shutdown)(struct snd_pcm_substream *);
26 int (*prepare)(struct snd_pcm_substream *);
27};
Takashi Iwai2c484df2005-06-30 18:54:04 +020028
Takashi Iwaid18f8372005-11-17 15:10:38 +010029extern int pxa2xx_pcm_new(struct snd_card *, struct pxa2xx_pcm_client *, struct snd_pcm **);
Takashi Iwai2c484df2005-06-30 18:54:04 +020030