diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/sh_dac_audio.c | 34 |
1 files changed, 15 insertions, 19 deletions
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 @@ | |||
6 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
7 | #include <linux/sound.h> | 7 | #include <linux/sound.h> |
8 | #include <linux/soundcard.h> | 8 | #include <linux/soundcard.h> |
9 | #include <linux/interrupt.h> | ||
9 | #include <asm/io.h> | 10 | #include <asm/io.h> |
10 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
11 | #include <asm/irq.h> | 12 | #include <asm/irq.h> |
12 | #include <asm/delay.h> | 13 | #include <asm/delay.h> |
13 | #include <linux/interrupt.h> | ||
14 | |||
15 | #include <asm/cpu/dac.h> | 14 | #include <asm/cpu/dac.h> |
16 | 15 | #include <asm/machvec.h> | |
17 | #ifdef MACH_HP600 | ||
18 | #include <asm/hp6xx/hp6xx.h> | 16 | #include <asm/hp6xx/hp6xx.h> |
19 | #include <asm/hd64461/hd64461.h> | 17 | #include <asm/hd64461/hd64461.h> |
20 | #endif | ||
21 | 18 | ||
22 | #define MODNAME "sh_dac_audio" | 19 | #define MODNAME "sh_dac_audio" |
23 | 20 | ||
@@ -71,26 +68,25 @@ static void dac_audio_sync(void) | |||
71 | 68 | ||
72 | static void dac_audio_start(void) | 69 | static void dac_audio_start(void) |
73 | { | 70 | { |
74 | #ifdef MACH_HP600 | 71 | if (mach_is_hp6xx()) { |
75 | u16 v; | 72 | u16 v = inw(HD64461_GPADR); |
76 | v = inw(HD64461_GPADR); | 73 | v &= ~HD64461_GPADR_SPEAKER; |
77 | v &= ~HD64461_GPADR_SPEAKER; | 74 | outw(v, HD64461_GPADR); |
78 | outw(v, HD64461_GPADR); | 75 | } |
79 | #endif | 76 | |
80 | sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); | 77 | sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); |
81 | ctrl_outw(TMU1_TCR_INIT, TMU1_TCR); | 78 | ctrl_outw(TMU1_TCR_INIT, TMU1_TCR); |
82 | } | 79 | } |
83 | static void dac_audio_stop(void) | 80 | static void dac_audio_stop(void) |
84 | { | 81 | { |
85 | #ifdef MACH_HP600 | ||
86 | u16 v; | ||
87 | #endif | ||
88 | dac_audio_stop_timer(); | 82 | dac_audio_stop_timer(); |
89 | #ifdef MACH_HP600 | 83 | |
90 | v = inw(HD64461_GPADR); | 84 | if (mach_is_hp6xx()) { |
91 | v |= HD64461_GPADR_SPEAKER; | 85 | u16 v = inw(HD64461_GPADR); |
92 | outw(v, HD64461_GPADR); | 86 | v |= HD64461_GPADR_SPEAKER; |
93 | #endif | 87 | outw(v, HD64461_GPADR); |
88 | } | ||
89 | |||
94 | sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); | 90 | sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); |
95 | } | 91 | } |
96 | 92 | ||