diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 15:12:11 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:20:09 +0100 |
commit | 67b1020d88a77a73bd9ccbc21733c155a4d7d44c (patch) | |
tree | 996fad816752751d467e70e632f7953fd872e7d5 | |
parent | 475675d6931ec03cf9575b26e30800fe64898ee0 (diff) | |
download | talos-op-linux-67b1020d88a77a73bd9ccbc21733c155a4d7d44c.tar.gz talos-op-linux-67b1020d88a77a73bd9ccbc21733c155a4d7d44c.zip |
[ALSA] Remove xxx_t typedefs: PARISC Harmony
Modules: PARISC Harmony driver
Remove xxx_t typedefs from the PARIC Harmony driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/parisc/harmony.c | 169 | ||||
-rw-r--r-- | sound/parisc/harmony.h | 14 |
2 files changed, 91 insertions, 92 deletions
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c index 0513137d4ec4..ce73f3eae78c 100644 --- a/sound/parisc/harmony.c +++ b/sound/parisc/harmony.c @@ -99,32 +99,32 @@ static unsigned int rate_bits[14] = { HARMONY_SR_44KHZ, HARMONY_SR_48KHZ }; -static snd_pcm_hw_constraint_list_t hw_constraint_rates = { +static struct snd_pcm_hw_constraint_list hw_constraint_rates = { .count = ARRAY_SIZE(snd_harmony_rates), .list = snd_harmony_rates, .mask = 0, }; -inline unsigned long -harmony_read(harmony_t *h, unsigned r) +static inline unsigned long +harmony_read(struct snd_harmony *h, unsigned r) { return __raw_readl(h->iobase + r); } -inline void -harmony_write(harmony_t *h, unsigned r, unsigned long v) +static inline void +harmony_write(struct snd_harmony *h, unsigned r, unsigned long v) { __raw_writel(v, h->iobase + r); } -static void -harmony_wait_for_control(harmony_t *h) +static inline void +harmony_wait_for_control(struct snd_harmony *h) { while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ; } -inline void -harmony_reset(harmony_t *h) +static inline void +harmony_reset(struct snd_harmony *h) { harmony_write(h, HARMONY_RESET, 1); mdelay(50); @@ -132,7 +132,7 @@ harmony_reset(harmony_t *h) } static void -harmony_disable_interrupts(harmony_t *h) +harmony_disable_interrupts(struct snd_harmony *h) { u32 dstatus; harmony_wait_for_control(h); @@ -142,7 +142,7 @@ harmony_disable_interrupts(harmony_t *h) } static void -harmony_enable_interrupts(harmony_t *h) +harmony_enable_interrupts(struct snd_harmony *h) { u32 dstatus; harmony_wait_for_control(h); @@ -152,7 +152,7 @@ harmony_enable_interrupts(harmony_t *h) } static void -harmony_mute(harmony_t *h) +harmony_mute(struct snd_harmony *h) { unsigned long flags; @@ -163,7 +163,7 @@ harmony_mute(harmony_t *h) } static void -harmony_unmute(harmony_t *h) +harmony_unmute(struct snd_harmony *h) { unsigned long flags; @@ -174,7 +174,7 @@ harmony_unmute(harmony_t *h) } static void -harmony_set_control(harmony_t *h) +harmony_set_control(struct snd_harmony *h) { u32 ctrl; unsigned long flags; @@ -196,7 +196,7 @@ static irqreturn_t snd_harmony_interrupt(int irq, void *dev, struct pt_regs *regs) { u32 dstatus; - harmony_t *h = dev; + struct snd_harmony *h = dev; spin_lock(&h->lock); harmony_disable_interrupts(h); @@ -261,7 +261,7 @@ snd_harmony_rate_bits(int rate) return HARMONY_SR_44KHZ; } -static snd_pcm_hardware_t snd_harmony_playback = +static struct snd_pcm_hardware snd_harmony_playback = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | @@ -282,7 +282,7 @@ static snd_pcm_hardware_t snd_harmony_playback = .fifo_size = 0, }; -static snd_pcm_hardware_t snd_harmony_capture = +static struct snd_pcm_hardware snd_harmony_capture = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | @@ -304,9 +304,9 @@ static snd_pcm_hardware_t snd_harmony_capture = }; static int -snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd) +snd_harmony_playback_trigger(struct snd_pcm_substream *ss, int cmd) { - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_harmony *h = snd_pcm_substream_chip(ss); if (h->st.capturing) return -EBUSY; @@ -340,9 +340,9 @@ snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd) } static int -snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd) +snd_harmony_capture_trigger(struct snd_pcm_substream *ss, int cmd) { - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_harmony *h = snd_pcm_substream_chip(ss); if (h->st.playing) return -EBUSY; @@ -376,7 +376,7 @@ snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd) } static int -snd_harmony_set_data_format(harmony_t *h, int fmt, int force) +snd_harmony_set_data_format(struct snd_harmony *h, int fmt, int force) { int o = h->st.format; int n; @@ -406,10 +406,10 @@ snd_harmony_set_data_format(harmony_t *h, int fmt, int force) } static int -snd_harmony_playback_prepare(snd_pcm_substream_t *ss) +snd_harmony_playback_prepare(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); - snd_pcm_runtime_t *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; if (h->st.capturing) return -EBUSY; @@ -436,10 +436,10 @@ snd_harmony_playback_prepare(snd_pcm_substream_t *ss) } static int -snd_harmony_capture_prepare(snd_pcm_substream_t *ss) +snd_harmony_capture_prepare(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); - snd_pcm_runtime_t *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; if (h->st.playing) return -EBUSY; @@ -466,10 +466,10 @@ snd_harmony_capture_prepare(snd_pcm_substream_t *ss) } static snd_pcm_uframes_t -snd_harmony_playback_pointer(snd_pcm_substream_t *ss) +snd_harmony_playback_pointer(struct snd_pcm_substream *ss) { - snd_pcm_runtime_t *rt = ss->runtime; - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); unsigned long pcuradd; unsigned long played; @@ -495,10 +495,10 @@ snd_harmony_playback_pointer(snd_pcm_substream_t *ss) } static snd_pcm_uframes_t -snd_harmony_capture_pointer(snd_pcm_substream_t *ss) +snd_harmony_capture_pointer(struct snd_pcm_substream *ss) { - snd_pcm_runtime_t *rt = ss->runtime; - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); unsigned long rcuradd; unsigned long caught; @@ -524,10 +524,10 @@ snd_harmony_capture_pointer(snd_pcm_substream_t *ss) } static int -snd_harmony_playback_open(snd_pcm_substream_t *ss) +snd_harmony_playback_open(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); - snd_pcm_runtime_t *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; int err; h->psubs = ss; @@ -543,10 +543,10 @@ snd_harmony_playback_open(snd_pcm_substream_t *ss) } static int -snd_harmony_capture_open(snd_pcm_substream_t *ss) +snd_harmony_capture_open(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); - snd_pcm_runtime_t *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; int err; h->csubs = ss; @@ -562,27 +562,27 @@ snd_harmony_capture_open(snd_pcm_substream_t *ss) } static int -snd_harmony_playback_close(snd_pcm_substream_t *ss) +snd_harmony_playback_close(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_harmony *h = snd_pcm_substream_chip(ss); h->psubs = NULL; return 0; } static int -snd_harmony_capture_close(snd_pcm_substream_t *ss) +snd_harmony_capture_close(struct snd_pcm_substream *ss) { - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_harmony *h = snd_pcm_substream_chip(ss); h->csubs = NULL; return 0; } static int -snd_harmony_hw_params(snd_pcm_substream_t *ss, - snd_pcm_hw_params_t *hw) +snd_harmony_hw_params(struct snd_pcm_substream *ss, + struct snd_pcm_hw_params *hw) { int err; - harmony_t *h = snd_pcm_substream_chip(ss); + struct snd_harmony *h = snd_pcm_substream_chip(ss); err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw)); if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS) @@ -592,12 +592,12 @@ snd_harmony_hw_params(snd_pcm_substream_t *ss, } static int -snd_harmony_hw_free(snd_pcm_substream_t *ss) +snd_harmony_hw_free(struct snd_pcm_substream *ss) { return snd_pcm_lib_free_pages(ss); } -static snd_pcm_ops_t snd_harmony_playback_ops = { +static struct snd_pcm_ops snd_harmony_playback_ops = { .open = snd_harmony_playback_open, .close = snd_harmony_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -608,7 +608,7 @@ static snd_pcm_ops_t snd_harmony_playback_ops = { .pointer = snd_harmony_playback_pointer, }; -static snd_pcm_ops_t snd_harmony_capture_ops = { +static struct snd_pcm_ops snd_harmony_capture_ops = { .open = snd_harmony_capture_open, .close = snd_harmony_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -620,9 +620,9 @@ static snd_pcm_ops_t snd_harmony_capture_ops = { }; static int -snd_harmony_pcm_init(harmony_t *h) +snd_harmony_pcm_init(struct snd_harmony *h) { - snd_pcm_t *pcm; + struct snd_pcm *pcm; int err; harmony_disable_interrupts(h); @@ -683,15 +683,15 @@ snd_harmony_pcm_init(harmony_t *h) } static void -snd_harmony_set_new_gain(harmony_t *h) +snd_harmony_set_new_gain(struct snd_harmony *h) { harmony_wait_for_control(h); harmony_write(h, HARMONY_GAINCTL, h->st.gain); } static int -snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, - snd_ctl_elem_info_t *uinfo) +snd_harmony_mixercontrol_info(struct snd_kcontrol *kc, + struct snd_ctl_elem_info *uinfo) { int mask = (kc->private_value >> 16) & 0xff; int left_shift = (kc->private_value) & 0xff; @@ -707,10 +707,10 @@ snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, } static int -snd_harmony_volume_get(snd_kcontrol_t *kc, - snd_ctl_elem_value_t *ucontrol) +snd_harmony_volume_get(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) { - harmony_t *h = snd_kcontrol_chip(kc); + struct snd_harmony *h = snd_kcontrol_chip(kc); int shift_left = (kc->private_value) & 0xff; int shift_right = (kc->private_value >> 8) & 0xff; int mask = (kc->private_value >> 16) & 0xff; @@ -736,10 +736,10 @@ snd_harmony_volume_get(snd_kcontrol_t *kc, } static int -snd_harmony_volume_put(snd_kcontrol_t *kc, - snd_ctl_elem_value_t *ucontrol) +snd_harmony_volume_put(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) { - harmony_t *h = snd_kcontrol_chip(kc); + struct snd_harmony *h = snd_kcontrol_chip(kc); int shift_left = (kc->private_value) & 0xff; int shift_right = (kc->private_value >> 8) & 0xff; int mask = (kc->private_value >> 16) & 0xff; @@ -771,8 +771,8 @@ snd_harmony_volume_put(snd_kcontrol_t *kc, } static int -snd_harmony_captureroute_info(snd_kcontrol_t *kc, - snd_ctl_elem_info_t *uinfo) +snd_harmony_captureroute_info(struct snd_kcontrol *kc, + struct snd_ctl_elem_info *uinfo) { static char *texts[2] = { "Line", "Mic" }; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; @@ -786,10 +786,10 @@ snd_harmony_captureroute_info(snd_kcontrol_t *kc, } static int -snd_harmony_captureroute_get(snd_kcontrol_t *kc, - snd_ctl_elem_value_t *ucontrol) +snd_harmony_captureroute_get(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) { - harmony_t *h = snd_kcontrol_chip(kc); + struct snd_harmony *h = snd_kcontrol_chip(kc); int value; spin_lock_irq(&h->mixer_lock); @@ -803,10 +803,10 @@ snd_harmony_captureroute_get(snd_kcontrol_t *kc, } static int -snd_harmony_captureroute_put(snd_kcontrol_t *kc, - snd_ctl_elem_value_t *ucontrol) +snd_harmony_captureroute_put(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) { - harmony_t *h = snd_kcontrol_chip(kc); + struct snd_harmony *h = snd_kcontrol_chip(kc); int value; int old_gain = h->st.gain; @@ -823,8 +823,7 @@ snd_harmony_captureroute_put(snd_kcontrol_t *kc, return h->st.gain != old_gain; } -#define HARMONY_CONTROLS (sizeof(snd_harmony_controls)/ \ - sizeof(snd_kcontrol_new_t)) +#define HARMONY_CONTROLS ARRAY_SIZE(snd_harmony_controls) #define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ @@ -833,7 +832,7 @@ snd_harmony_captureroute_put(snd_kcontrol_t *kc, .private_value = ((left_shift) | ((right_shift) << 8) | \ ((mask) << 16) | ((invert) << 24)) } -static snd_kcontrol_new_t snd_harmony_controls[] = { +static struct snd_kcontrol_new snd_harmony_controls[] = { HARMONY_VOLUME("Master Playback Volume", HARMONY_GAIN_LO_SHIFT, HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1), HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT, @@ -856,7 +855,7 @@ static snd_kcontrol_new_t snd_harmony_controls[] = { }; static void __init -snd_harmony_mixer_reset(harmony_t *h) +snd_harmony_mixer_reset(struct snd_harmony *h) { harmony_mute(h); harmony_reset(h); @@ -865,9 +864,9 @@ snd_harmony_mixer_reset(harmony_t *h) } static int __init -snd_harmony_mixer_init(harmony_t *h) +snd_harmony_mixer_init(struct snd_harmony *h) { - snd_card_t *card = h->card; + struct snd_card *card = h->card; int idx, err; snd_assert(h != NULL, return -EINVAL); @@ -886,7 +885,7 @@ snd_harmony_mixer_init(harmony_t *h) } static int -snd_harmony_free(harmony_t *h) +snd_harmony_free(struct snd_harmony *h) { if (h->gdma.addr) snd_dma_free_pages(&h->gdma); @@ -906,20 +905,20 @@ snd_harmony_free(harmony_t *h) } static int -snd_harmony_dev_free(snd_device_t *dev) +snd_harmony_dev_free(struct snd_device *dev) { - harmony_t *h = dev->device_data; + struct snd_harmony *h = dev->device_data; return snd_harmony_free(h); } static int __devinit -snd_harmony_create(snd_card_t *card, +snd_harmony_create(struct snd_card *card, struct parisc_device *padev, - harmony_t **rchip) + struct snd_harmony **rchip) { int err; - harmony_t *h; - static snd_device_ops_t ops = { + struct snd_harmony *h; + static struct snd_device_ops ops = { .dev_free = snd_harmony_dev_free, }; @@ -973,8 +972,8 @@ static int __devinit snd_harmony_probe(struct parisc_device *padev) { int err; - snd_card_t *card; - harmony_t *h; + struct snd_card *card; + struct snd_harmony *h; card = snd_card_new(index, id, THIS_MODULE, 0); if (card == NULL) @@ -1033,7 +1032,7 @@ alsa_harmony_init(void) static void __exit alsa_harmony_fini(void) { - return unregister_parisc_driver(&snd_harmony_driver); + unregister_parisc_driver(&snd_harmony_driver); } MODULE_LICENSE("GPL"); diff --git a/sound/parisc/harmony.h b/sound/parisc/harmony.h index 526c52389de2..2e434523fedf 100644 --- a/sound/parisc/harmony.h +++ b/sound/parisc/harmony.h @@ -13,7 +13,7 @@ struct harmony_buffer { int coherent; }; -typedef struct snd_card_harmony { +struct snd_harmony { int irq; unsigned long hpa; /* hard physical address */ @@ -44,15 +44,15 @@ typedef struct snd_card_harmony { unsigned long silence_intr; } stats; - snd_pcm_t *pcm; - snd_card_t *card; - snd_pcm_substream_t *psubs; - snd_pcm_substream_t *csubs; - snd_info_entry_t *proc; + struct snd_pcm *pcm; + struct snd_card *card; + struct snd_pcm_substream *psubs; + struct snd_pcm_substream *csubs; + struct snd_info_entry *proc; spinlock_t lock; spinlock_t mixer_lock; -} harmony_t; +}; #define MAX_PCM_DEVICES 1 #define MAX_PCM_SUBSTREAMS 4 |