summaryrefslogtreecommitdiffstats
path: root/sound/arm
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 15:10:38 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:20:03 +0100
commitd18f83764e376dea9e14a8ac53d1e14004fa9c13 (patch)
treef51e4a25f8cf71d642c0ab46233858322427c293 /sound/arm
parentceb9e476c89f50e9ba7de914bbec2c05e9647915 (diff)
downloadtalos-obmc-linux-d18f83764e376dea9e14a8ac53d1e14004fa9c13.tar.gz
talos-obmc-linux-d18f83764e376dea9e14a8ac53d1e14004fa9c13.zip
[ALSA] Remove xxx_t typedefs: ARM PXA2xx
Modules: ARM PXA2XX driver Remove xxx_t typedefs from the ARM PXA2xx driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/arm')
-rw-r--r--sound/arm/pxa2xx-ac97.c44
-rw-r--r--sound/arm/pxa2xx-pcm.c59
-rw-r--r--sound/arm/pxa2xx-pcm.h20
3 files changed, 62 insertions, 61 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index c96c8a2aa1c2..d9efc37393ee 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -37,7 +37,7 @@ static DECLARE_MUTEX(car_mutex);
static DECLARE_WAIT_QUEUE_HEAD(gsr_wq);
static volatile long gsr_bits;
-static unsigned short pxa2xx_ac97_read(ac97_t *ac97, unsigned short reg)
+static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
{
unsigned short val = -1;
volatile u32 *reg_addr;
@@ -75,7 +75,7 @@ out: up(&car_mutex);
return val;
}
-static void pxa2xx_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
+static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
{
volatile u32 *reg_addr;
@@ -99,7 +99,7 @@ static void pxa2xx_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short v
out: up(&car_mutex);
}
-static void pxa2xx_ac97_reset(ac97_t *ac97)
+static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)
{
/* First, try cold reset */
GCR &= GCR_COLD_RST; /* clear everything but nCRST */
@@ -172,13 +172,13 @@ static irqreturn_t pxa2xx_ac97_irq(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_NONE;
}
-static ac97_bus_ops_t pxa2xx_ac97_ops = {
+static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
.read = pxa2xx_ac97_read,
.write = pxa2xx_ac97_write,
.reset = pxa2xx_ac97_reset,
};
-static pxa2xx_pcm_dma_params_t pxa2xx_ac97_pcm_out = {
+static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_out = {
.name = "AC97 PCM out",
.dev_addr = __PREG(PCDR),
.drcmr = &DRCMRTXPCDR,
@@ -186,7 +186,7 @@ static pxa2xx_pcm_dma_params_t pxa2xx_ac97_pcm_out = {
DCMD_BURST32 | DCMD_WIDTH4,
};
-static pxa2xx_pcm_dma_params_t pxa2xx_ac97_pcm_in = {
+static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_in = {
.name = "AC97 PCM in",
.dev_addr = __PREG(PCDR),
.drcmr = &DRCMRRXPCDR,
@@ -194,12 +194,12 @@ static pxa2xx_pcm_dma_params_t pxa2xx_ac97_pcm_in = {
DCMD_BURST32 | DCMD_WIDTH4,
};
-static snd_pcm_t *pxa2xx_ac97_pcm;
-static ac97_t *pxa2xx_ac97_ac97;
+static struct snd_pcm *pxa2xx_ac97_pcm;
+static struct snd_ac97 *pxa2xx_ac97_ac97;
-static int pxa2xx_ac97_pcm_startup(snd_pcm_substream_t *substream)
+static int pxa2xx_ac97_pcm_startup(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
pxa2xx_audio_ops_t *platform_ops;
int r;
@@ -218,7 +218,7 @@ static int pxa2xx_ac97_pcm_startup(snd_pcm_substream_t *substream)
return 0;
}
-static void pxa2xx_ac97_pcm_shutdown(snd_pcm_substream_t *substream)
+static void pxa2xx_ac97_pcm_shutdown(struct snd_pcm_substream *substream)
{
pxa2xx_audio_ops_t *platform_ops;
@@ -227,15 +227,15 @@ static void pxa2xx_ac97_pcm_shutdown(snd_pcm_substream_t *substream)
platform_ops->shutdown(substream, platform_ops->priv);
}
-static int pxa2xx_ac97_pcm_prepare(snd_pcm_substream_t *substream)
+static int pxa2xx_ac97_pcm_prepare(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int reg = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE;
return snd_ac97_set_rate(pxa2xx_ac97_ac97, reg, runtime->rate);
}
-static pxa2xx_pcm_client_t pxa2xx_ac97_pcm_client = {
+static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = {
.playback_params = &pxa2xx_ac97_pcm_out,
.capture_params = &pxa2xx_ac97_pcm_in,
.startup = pxa2xx_ac97_pcm_startup,
@@ -245,7 +245,7 @@ static pxa2xx_pcm_client_t pxa2xx_ac97_pcm_client = {
#ifdef CONFIG_PM
-static int pxa2xx_ac97_do_suspend(snd_card_t *card, pm_message_t state)
+static int pxa2xx_ac97_do_suspend(struct snd_card *card, pm_message_t state)
{
if (card->power_state != SNDRV_CTL_POWER_D3cold) {
pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
@@ -261,7 +261,7 @@ static int pxa2xx_ac97_do_suspend(snd_card_t *card, pm_message_t state)
return 0;
}
-static int pxa2xx_ac97_do_resume(snd_card_t *card)
+static int pxa2xx_ac97_do_resume(struct snd_card *card)
{
if (card->power_state != SNDRV_CTL_POWER_D0) {
pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
@@ -277,7 +277,7 @@ static int pxa2xx_ac97_do_resume(snd_card_t *card)
static int pxa2xx_ac97_suspend(struct platform_device *dev, pm_message_t state)
{
- snd_card_t *card = platform_get_drvdata(dev);
+ struct snd_card *card = platform_get_drvdata(dev);
int ret = 0;
if (card)
@@ -288,7 +288,7 @@ static int pxa2xx_ac97_suspend(struct platform_device *dev, pm_message_t state)
static int pxa2xx_ac97_resume(struct platform_device *dev)
{
- snd_card_t *card = platform_get_drvdata(dev);
+ struct snd_card *card = platform_get_drvdata(dev);
int ret = 0;
if (card)
@@ -304,9 +304,9 @@ static int pxa2xx_ac97_resume(struct platform_device *dev)
static int pxa2xx_ac97_probe(struct platform_device *dev)
{
- snd_card_t *card;
- ac97_bus_t *ac97_bus;
- ac97_template_t ac97_template;
+ struct snd_card *card;
+ struct snd_ac97_bus *ac97_bus;
+ struct snd_ac97_template ac97_template;
int ret;
ret = -ENOMEM;
@@ -370,7 +370,7 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
static int pxa2xx_ac97_remove(struct platform_device *dev)
{
- snd_card_t *card = platform_get_drvdata(dev);
+ struct snd_card *card = platform_get_drvdata(dev);
if (card) {
snd_card_free(card);
diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c
index b1eb53b02eae..4938ef10b813 100644
--- a/sound/arm/pxa2xx-pcm.c
+++ b/sound/arm/pxa2xx-pcm.c
@@ -28,7 +28,7 @@
#include "pxa2xx-pcm.h"
-static const snd_pcm_hardware_t pxa2xx_pcm_hardware = {
+static const struct snd_pcm_hardware pxa2xx_pcm_hardware = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED |
@@ -44,15 +44,15 @@ static const snd_pcm_hardware_t pxa2xx_pcm_hardware = {
struct pxa2xx_runtime_data {
int dma_ch;
- pxa2xx_pcm_dma_params_t *params;
+ struct pxa2xx_pcm_dma_params *params;
pxa_dma_desc *dma_desc_array;
dma_addr_t dma_desc_array_phys;
};
-static int pxa2xx_pcm_hw_params(snd_pcm_substream_t *substream,
- snd_pcm_hw_params_t *params)
+static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct pxa2xx_runtime_data *rtd = runtime->private_data;
size_t totsize = params_buffer_bytes(params);
size_t period = params_period_bytes(params);
@@ -86,7 +86,7 @@ static int pxa2xx_pcm_hw_params(snd_pcm_substream_t *substream,
return 0;
}
-static int pxa2xx_pcm_hw_free(snd_pcm_substream_t *substream)
+static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
{
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
@@ -95,10 +95,10 @@ static int pxa2xx_pcm_hw_free(snd_pcm_substream_t *substream)
return 0;
}
-static int pxa2xx_pcm_prepare(snd_pcm_substream_t *substream)
+static int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream)
{
- pxa2xx_pcm_client_t *client = substream->private_data;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct pxa2xx_pcm_client *client = substream->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct pxa2xx_runtime_data *rtd = runtime->private_data;
DCSR(rtd->dma_ch) &= ~DCSR_RUN;
@@ -109,7 +109,7 @@ static int pxa2xx_pcm_prepare(snd_pcm_substream_t *substream)
return client->prepare(substream);
}
-static int pxa2xx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
+static int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
int ret = 0;
@@ -139,7 +139,7 @@ static int pxa2xx_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id, struct pt_regs *regs)
{
- snd_pcm_substream_t *substream = dev_id;
+ struct snd_pcm_substream *substream = dev_id;
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
int dcsr;
@@ -155,9 +155,9 @@ static void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id, struct pt_regs *regs)
}
}
-static snd_pcm_uframes_t pxa2xx_pcm_pointer(snd_pcm_substream_t *substream)
+static snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct pxa2xx_runtime_data *rtd = runtime->private_data;
dma_addr_t ptr = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
DSADR(rtd->dma_ch) : DTADR(rtd->dma_ch);
@@ -168,9 +168,9 @@ static snd_pcm_uframes_t pxa2xx_pcm_pointer(snd_pcm_substream_t *substream)
}
static int
-pxa2xx_pcm_hw_rule_mult32(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule)
+pxa2xx_pcm_hw_rule_mult32(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)
{
- snd_interval_t *i = hw_param_interval(params, rule->var);
+ struct snd_interval *i = hw_param_interval(params, rule->var);
int changed = 0;
if (i->min & 31) {
@@ -188,10 +188,10 @@ pxa2xx_pcm_hw_rule_mult32(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule)
return changed;
}
-static int pxa2xx_pcm_open(snd_pcm_substream_t *substream)
+static int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
{
- pxa2xx_pcm_client_t *client = substream->private_data;
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct pxa2xx_pcm_client *client = substream->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct pxa2xx_runtime_data *rtd;
int ret;
@@ -246,9 +246,9 @@ static int pxa2xx_pcm_open(snd_pcm_substream_t *substream)
return ret;
}
-static int pxa2xx_pcm_close(snd_pcm_substream_t *substream)
+static int pxa2xx_pcm_close(struct snd_pcm_substream *substream)
{
- pxa2xx_pcm_client_t *client = substream->private_data;
+ struct pxa2xx_pcm_client *client = substream->private_data;
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
pxa_free_dma(rtd->dma_ch);
@@ -260,16 +260,16 @@ static int pxa2xx_pcm_close(snd_pcm_substream_t *substream)
}
static int
-pxa2xx_pcm_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *vma)
+pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
return dma_mmap_writecombine(substream->pcm->card->dev, vma,
runtime->dma_area,
runtime->dma_addr,
runtime->dma_bytes);
}
-static snd_pcm_ops_t pxa2xx_pcm_ops = {
+static struct snd_pcm_ops pxa2xx_pcm_ops = {
.open = pxa2xx_pcm_open,
.close = pxa2xx_pcm_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -281,9 +281,9 @@ static snd_pcm_ops_t pxa2xx_pcm_ops = {
.mmap = pxa2xx_pcm_mmap,
};
-static int pxa2xx_pcm_preallocate_dma_buffer(snd_pcm_t *pcm, int stream)
+static int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
{
- snd_pcm_substream_t *substream = pcm->streams[stream].substream;
+ struct snd_pcm_substream *substream = pcm->streams[stream].substream;
struct snd_dma_buffer *buf = &substream->dma_buffer;
size_t size = pxa2xx_pcm_hardware.buffer_bytes_max;
buf->dev.type = SNDRV_DMA_TYPE_DEV;
@@ -297,9 +297,9 @@ static int pxa2xx_pcm_preallocate_dma_buffer(snd_pcm_t *pcm, int stream)
return 0;
}
-static void pxa2xx_pcm_free_dma_buffers(snd_pcm_t *pcm)
+static void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
{
- snd_pcm_substream_t *substream;
+ struct snd_pcm_substream *substream;
struct snd_dma_buffer *buf;
int stream;
@@ -318,9 +318,10 @@ static void pxa2xx_pcm_free_dma_buffers(snd_pcm_t *pcm)
static u64 pxa2xx_pcm_dmamask = 0xffffffff;
-int pxa2xx_pcm_new(snd_card_t *card, pxa2xx_pcm_client_t *client, snd_pcm_t **rpcm)
+int pxa2xx_pcm_new(struct snd_card *card, struct pxa2xx_pcm_client *client,
+ struct snd_pcm **rpcm)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int play = client->playback_params ? 1 : 0;
int capt = client->capture_params ? 1 : 0;
int ret;
diff --git a/sound/arm/pxa2xx-pcm.h b/sound/arm/pxa2xx-pcm.h
index 43517597cab9..b79f1e803780 100644
--- a/sound/arm/pxa2xx-pcm.h
+++ b/sound/arm/pxa2xx-pcm.h
@@ -10,20 +10,20 @@
* published by the Free Software Foundation.
*/
-typedef struct {
+struct pxa2xx_pcm_dma_params {
char *name; /* stream identifier */
u32 dcmd; /* DMA descriptor dcmd field */
volatile u32 *drcmr; /* the DMA request channel to use */
u32 dev_addr; /* device physical address for DMA */
-} pxa2xx_pcm_dma_params_t;
+};
-typedef struct {
- pxa2xx_pcm_dma_params_t *playback_params;
- pxa2xx_pcm_dma_params_t *capture_params;
- int (*startup)(snd_pcm_substream_t *);
- void (*shutdown)(snd_pcm_substream_t *);
- int (*prepare)(snd_pcm_substream_t *);
-} pxa2xx_pcm_client_t;
+struct pxa2xx_pcm_client {
+ struct pxa2xx_pcm_dma_params *playback_params;
+ struct pxa2xx_pcm_dma_params *capture_params;
+ int (*startup)(struct snd_pcm_substream *);
+ void (*shutdown)(struct snd_pcm_substream *);
+ int (*prepare)(struct snd_pcm_substream *);
+};
-extern int pxa2xx_pcm_new(snd_card_t *, pxa2xx_pcm_client_t *, snd_pcm_t **);
+extern int pxa2xx_pcm_new(struct snd_card *, struct pxa2xx_pcm_client *, struct snd_pcm **);
OpenPOWER on IntegriCloud