diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 16:29:59 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 16:29:59 +0400 |
commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
tree | 5e32586114534ed3f2165614cba3d578f5d87307 /sound | |
parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
download | linux-185a257f2f73bcd89050ad02da5bedbc28fc43fa.tar.xz |
Merge branch 'master' into gfs2
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/au1550_ac97.c | 6 | ||||
-rw-r--r-- | sound/oss/sh_dac_audio.c | 60 | ||||
-rw-r--r-- | sound/sparc/amd7930.c | 20 | ||||
-rw-r--r-- | sound/usb/usbmidi.c | 6 |
4 files changed, 49 insertions, 43 deletions
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 4cdb86252d67..219795171c71 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -719,8 +719,7 @@ prog_dmabuf_dac(struct au1550_state *s) } -static void -dac_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static void dac_dma_interrupt(int irq, void *dev_id) { struct au1550_state *s = (struct au1550_state *) dev_id; struct dmabuf *db = &s->dma_dac; @@ -754,8 +753,7 @@ dac_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) } -static void -adc_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static void adc_dma_interrupt(int irq, void *dev_id) { struct au1550_state *s = (struct au1550_state *)dev_id; struct dmabuf *dp = &s->dma_adc; diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 7b168d85f4ab..83ff8a71f716 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c @@ -1,3 +1,14 @@ +/* + * sound/oss/sh_dac_audio.c + * + * SH DAC based sound :( + * + * Copyright (C) 2004,2005 Andriy Skulysh + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ #include <linux/module.h> #include <linux/init.h> #include <linux/sched.h> @@ -6,18 +17,17 @@ #include <linux/fs.h> #include <linux/sound.h> #include <linux/soundcard.h> +#include <linux/interrupt.h> #include <asm/io.h> #include <asm/uaccess.h> #include <asm/irq.h> #include <asm/delay.h> -#include <linux/interrupt.h> - +#include <asm/clock.h> #include <asm/cpu/dac.h> - -#ifdef MACH_HP600 +#include <asm/cpu/timer.h> +#include <asm/machvec.h> #include <asm/hp6xx/hp6xx.h> -#include <asm/hd64461/hd64461.h> -#endif +#include <asm/hd64461.h> #define MODNAME "sh_dac_audio" @@ -26,11 +36,6 @@ #define TMU1_TCR_INIT 0x0020 /* Clock/4, rising edge; interrupt on */ #define TMU1_TSTR_INIT 0x02 /* Bit to turn on TMU1 */ -#define TMU_TSTR 0xfffffe92 -#define TMU1_TCOR 0xfffffea0 -#define TMU1_TCNT 0xfffffea4 -#define TMU1_TCR 0xfffffea8 - #define BUFFER_SIZE 48000 static int rate; @@ -71,34 +76,37 @@ static void dac_audio_sync(void) static void dac_audio_start(void) { -#ifdef MACH_HP600 - u16 v; - v = inw(HD64461_GPADR); - v &= ~HD64461_GPADR_SPEAKER; - outw(v, HD64461_GPADR); -#endif + if (mach_is_hp6xx()) { + u16 v = inw(HD64461_GPADR); + v &= ~HD64461_GPADR_SPEAKER; + outw(v, HD64461_GPADR); + } + sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); ctrl_outw(TMU1_TCR_INIT, TMU1_TCR); } static void dac_audio_stop(void) { -#ifdef MACH_HP600 - u16 v; -#endif dac_audio_stop_timer(); -#ifdef MACH_HP600 - v = inw(HD64461_GPADR); - v |= HD64461_GPADR_SPEAKER; - outw(v, HD64461_GPADR); -#endif + + if (mach_is_hp6xx()) { + u16 v = inw(HD64461_GPADR); + v |= HD64461_GPADR_SPEAKER; + outw(v, HD64461_GPADR); + } + + sh_dac_output(0, CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); } static void dac_audio_set_rate(void) { unsigned long interval; + struct clk *clk; - interval = (current_cpu_data.module_clock / 4) / rate; + clk = clk_get("module_clk"); + interval = (clk_get_rate(clk) / 4) / rate; + clk_put(clk); ctrl_outl(interval, TMU1_TCOR); ctrl_outl(interval, TMU1_TCNT); } diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 2bd8e40b8541..be0bd503f013 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c @@ -755,7 +755,7 @@ static struct snd_pcm_ops snd_amd7930_capture_ops = { .pointer = snd_amd7930_capture_pointer, }; -static int __init snd_amd7930_pcm(struct snd_amd7930 *amd) +static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd) { struct snd_pcm *pcm; int err; @@ -870,7 +870,7 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem return change; } -static struct snd_kcontrol_new amd7930_controls[] __initdata = { +static struct snd_kcontrol_new amd7930_controls[] __devinitdata = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Monitor Volume", @@ -900,7 +900,7 @@ static struct snd_kcontrol_new amd7930_controls[] __initdata = { }, }; -static int __init snd_amd7930_mixer(struct snd_amd7930 *amd) +static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd) { struct snd_card *card; int idx, err; @@ -945,11 +945,11 @@ static struct snd_device_ops snd_amd7930_dev_ops = { .dev_free = snd_amd7930_dev_free, }; -static int __init snd_amd7930_create(struct snd_card *card, - struct resource *rp, - unsigned int reg_size, - int irq, int dev, - struct snd_amd7930 **ramd) +static int __devinit snd_amd7930_create(struct snd_card *card, + struct resource *rp, + unsigned int reg_size, + int irq, int dev, + struct snd_amd7930 **ramd) { unsigned long flags; struct snd_amd7930 *amd; @@ -1013,7 +1013,7 @@ static int __init snd_amd7930_create(struct snd_card *card, return 0; } -static int __init amd7930_attach_common(struct resource *rp, int irq) +static int __devinit amd7930_attach_common(struct resource *rp, int irq) { static int dev_num; struct snd_card *card; @@ -1065,7 +1065,7 @@ out_err: return err; } -static int __init amd7930_obio_attach(struct device_node *dp) +static int __devinit amd7930_obio_attach(struct device_node *dp) { struct linux_prom_registers *regs; struct linux_prom_irqs *irqp; diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 5105b6b05748..abe29dadd979 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -181,9 +181,9 @@ static int snd_usbmidi_urb_error(int status) case -ENODEV: return -ENODEV; /* errors that might occur during unplugging */ - case -EPROTO: /* EHCI */ - case -ETIMEDOUT: /* OHCI */ - case -EILSEQ: /* UHCI */ + case -EPROTO: + case -ETIME: + case -EILSEQ: return -EIO; default: snd_printk(KERN_ERR "urb status %d\n", status); |