2 * Hardware audio controls for HP iPAQ h5400
4 * Copyright © 2005 Erik Hovland <erik@hovland.org>
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/kernel.h>
16 #include <sound/ak4535.h>
17 #include <linux/device.h>
18 #include <asm/hardware.h>
20 #include <asm/arch/ipaq.h>
21 #include <asm/arch/h5400-asic.h>
22 #include <linux/platform_device.h>
24 #include <asm/hardware/samcop_base.h>
26 /* It's up to the <machine>_audio drive to initialize
27 * the ak4535_device_controls variable, as it's needed
28 * to initialize the ak4535 module.
31 ak4535_device_controls_t ak4535_device_controls
;
33 static void h5400_codec_set_power (int mode
)
35 samcop_set_gpio_b (&h5400_samcop
.dev
,
36 SAMCOP_GPIO_GPB_CODEC_POWER_ON
,
40 static void h5400_audio_set_power (int mode
)
42 samcop_set_gpio_b (&h5400_samcop
.dev
,
43 SAMCOP_GPIO_GPB_AUDIO_POWER_ON
,
47 static void h5400_audio_set_mute (int mode
)
51 static int __init
h5400_audio_init(void)
53 ak4535_device_controls
.set_codec_power
= h5400_codec_set_power
;
54 ak4535_device_controls
.set_audio_power
= h5400_audio_set_power
;
55 ak4535_device_controls
.set_audio_mute
= h5400_audio_set_mute
;
59 static void __exit
h5400_audio_exit(void)
61 ak4535_device_controls
.set_codec_power
= NULL
;
62 ak4535_device_controls
.set_audio_power
= NULL
;
63 ak4535_device_controls
.set_audio_mute
= NULL
;
67 module_init(h5400_audio_init
);
68 module_exit(h5400_audio_exit
);
70 EXPORT_SYMBOL(ak4535_device_controls
);
71 MODULE_AUTHOR("Erik Hovland <erik@hovland.org>");
72 MODULE_DESCRIPTION("Hardware audio controls for HP iPAQ h5xxx");
73 MODULE_LICENSE("GPL");