aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-13 18:48:06 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:23:39 +0100
commitf7cbb7fcd3bae5264a079e06411b35366da9bd4d (patch)
treecc6c46c6e68f2c13da665ad30c9e1dd370dcb7cf /drivers/media/video/saa7134
parent97c67b65cbdfd19887450ae1b80ddbb54de9559d (diff)
[ALSA] Fix snd_xxx_t typedefs
Modules: PXA Mainstone driver,CX88 driver,SAA7134 driver Replace snd_xxx_t typedefs with explicit structs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c65
-rw-r--r--drivers/media/video/saa7134/saa7134.h2
2 files changed, 37 insertions, 30 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 7df5e0826e1..e02e6ee31b7 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -71,7 +71,7 @@ MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s).");
*/
typedef struct snd_card_saa7134 {
- snd_card_t *card;
+ struct snd_card *card;
spinlock_t mixer_lock;
int mixer_volume[MIXER_ADDR_LAST+1][2];
int capture_source[MIXER_ADDR_LAST+1][2];
@@ -95,10 +95,10 @@ typedef struct snd_card_saa7134_pcm {
spinlock_t lock;
- snd_pcm_substream_t *substream;
+ struct snd_pcm_substream *substream;
} snd_card_saa7134_pcm_t;
-static snd_card_t *snd_saa7134_cards[SNDRV_CARDS];
+static struct snd_card *snd_saa7134_cards[SNDRV_CARDS];
/*
@@ -251,10 +251,10 @@ out:
*
*/
-static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream,
int cmd)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_saa7134_pcm_t *pcm = runtime->private_data;
struct saa7134_dev *dev=pcm->dev;
int err = 0;
@@ -333,9 +333,9 @@ static int dsp_buffer_free(struct saa7134_dev *dev)
*
*/
-static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
int bswap, sign;
u32 fmt, control;
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
@@ -422,9 +422,10 @@ static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream)
*
*/
-static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t
+snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_saa7134_pcm_t *pcm = runtime->private_data;
struct saa7134_dev *dev=pcm->dev;
@@ -442,7 +443,7 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t *
* ALSA hardware capabilities definition
*/
-static snd_pcm_hardware_t snd_card_saa7134_capture =
+static struct snd_pcm_hardware snd_card_saa7134_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -465,7 +466,7 @@ static snd_pcm_hardware_t snd_card_saa7134_capture =
.periods_max = 1024,
};
-static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime)
+static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime)
{
snd_card_saa7134_pcm_t *pcm = runtime->private_data;
@@ -482,8 +483,8 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime)
*
*/
-static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
+ struct snd_pcm_hw_params * hw_params)
{
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
struct saa7134_dev *dev;
@@ -562,7 +563,7 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream,
*
*/
-static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream)
+static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
{
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
struct saa7134_dev *dev;
@@ -588,7 +589,7 @@ static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream)
*
*/
-static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream)
+static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
{
return 0;
}
@@ -603,9 +604,9 @@ static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream)
*
*/
-static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream)
+static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_saa7134_pcm_t *pcm;
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
struct saa7134_dev *dev = saa7134->dev;
@@ -641,7 +642,7 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream)
* ALSA capture callbacks definition
*/
-static snd_pcm_ops_t snd_card_saa7134_capture_ops = {
+static struct snd_pcm_ops snd_card_saa7134_capture_ops = {
.open = snd_card_saa7134_capture_open,
.close = snd_card_saa7134_capture_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -662,7 +663,7 @@ static snd_pcm_ops_t snd_card_saa7134_capture_ops = {
static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int err;
if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0)
@@ -680,7 +681,8 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device)
.get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \
.private_value = addr }
-static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
@@ -689,7 +691,8 @@ static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_
return 0;
}
-static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
int addr = kcontrol->private_value;
@@ -699,7 +702,8 @@ static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0;
}
-static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
int change, addr = kcontrol->private_value;
@@ -730,7 +734,8 @@ static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
.get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \
.private_value = addr }
-static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 2;
@@ -739,7 +744,8 @@ static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_
return 0;
}
-static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
int addr = kcontrol->private_value;
@@ -752,7 +758,8 @@ static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0;
}
-static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol);
int change, addr = kcontrol->private_value;
@@ -829,7 +836,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return change;
}
-static snd_kcontrol_new_t snd_saa7134_controls[] = {
+static struct snd_kcontrol_new snd_saa7134_controls[] = {
SAA713x_VOLUME("Video Volume", 0, MIXER_ADDR_TVTUNER),
SAA713x_CAPSRC("Video Capture Switch", 0, MIXER_ADDR_TVTUNER),
SAA713x_VOLUME("Line Volume", 1, MIXER_ADDR_LINE1),
@@ -848,7 +855,7 @@ SAA713x_CAPSRC("Line Capture Switch", 2, MIXER_ADDR_LINE2),
static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
{
- snd_card_t *card = chip->card;
+ struct snd_card *card = chip->card;
unsigned int idx;
int err;
@@ -862,7 +869,7 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
return 0;
}
-static void snd_saa7134_free(snd_card_t * card)
+static void snd_saa7134_free(struct snd_card * card)
{
snd_card_saa7134_t *chip = card->private_data;
@@ -889,7 +896,7 @@ static void snd_saa7134_free(snd_card_t * card)
static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_card_saa7134_t *chip;
int err;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 3261d8bebdd..6873d9a85ef 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -386,7 +386,7 @@ struct saa7134_dmasound {
unsigned int read_offset;
unsigned int read_count;
void * priv_data;
- snd_pcm_substream_t *substream;
+ struct snd_pcm_substream *substream;
};
/* IR input */