From 53e62d3aaa60590d4a69b4e07c29f448b5151047 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 25 Sep 2006 23:32:10 -0700 Subject: [PATCH] Alchemy: Delete unused pt_regs * argument from au1xxx_dbdma_chan_alloc The third argument of au1xxx_dbdma_chan_alloc's callback function is not used anywhere. Signed-off-by: Ralf Baechle Cc: David Howells Cc: Russell King Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/au1550_ac97.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/oss') 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; -- cgit v1.2.1 From 4bcac20a7a01d49dffb5e88a8140efa34927c383 Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Wed, 27 Sep 2006 13:07:38 +0900 Subject: sh: hp6xx mach-type cleanups. Some minor cleanups for the updated consolidated hp6xx mach-type. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt --- sound/oss/sh_dac_audio.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'sound/oss') diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 7b168d85f4ab..ae7fccc510a1 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c @@ -6,18 +6,15 @@ #include #include #include +#include #include #include #include #include -#include - #include - -#ifdef MACH_HP600 +#include #include #include -#endif #define MODNAME "sh_dac_audio" @@ -71,26 +68,25 @@ 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_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); } -- cgit v1.2.1 From 7e27b9b720e74f471f0f0880c56578d07206c0af Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Wed, 27 Sep 2006 13:48:32 +0900 Subject: sound: SH DAC audio driver updates. Update the SH DAC audio driver for the clock framework. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt --- sound/oss/sh_dac_audio.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'sound/oss') diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index ae7fccc510a1..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 #include #include @@ -11,10 +22,12 @@ #include #include #include +#include #include +#include #include #include -#include +#include #define MODNAME "sh_dac_audio" @@ -23,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; @@ -87,14 +95,18 @@ static void dac_audio_stop(void) 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); } -- cgit v1.2.1