/* * Hardware audio controls for HP iPAQ h2200 * * Copyright © 2004 Michael Opdenacker * Modiefied 2004-11-21 by Jelle Kalf for H4xxx operations * * 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 #include #include #include #include /* It's up to the _audio drive to initialize * the uda1380_device_controls variable, as it's needed * to initialize the uda1380 module. * * I hope it's not an issue to have 2 different _audio * modules defining the same uda1380_device_controls symbol, * provided only one such module is used at a time. * Let me know if there are better solutions! */ uda1380_device_controls_t uda1380_device_controls; static void h4000_audio_set_codec_power (int mode) { SET_H4000_GPIO(AC_SDATA_IN, mode); } static void h4000_audio_set_codec_reset (int mode) { SET_H4000_GPIO(CODEC_RST, mode); } static void h4000_audio_set_speaker_power (int mode) { SET_H4000_GPIO(AC_SDATA_OUT, mode); } static void h4000_audio_set_tda_mode (int mode) { SET_H4000_GPIO(AC_AUDIO_CLK, mode); } static int __init h4000_audio_init(void) { uda1380_device_controls.set_codec_power = h4000_audio_set_codec_power; uda1380_device_controls.set_codec_reset = h4000_audio_set_codec_reset; uda1380_device_controls.set_speaker_power = h4000_audio_set_speaker_power; uda1380_device_controls.set_tda_mode = h4000_audio_set_tda_mode; return (0); } static void __exit h4000_audio_exit(void) { uda1380_device_controls.set_codec_power = NULL; uda1380_device_controls.set_codec_reset = NULL; uda1380_device_controls.set_speaker_power = NULL; uda1380_device_controls.set_tda_mode = NULL; } module_init(h4000_audio_init); module_exit(h4000_audio_exit); EXPORT_SYMBOL(uda1380_device_controls); MODULE_AUTHOR("Michael Opdenacker "); MODULE_DESCRIPTION("Hardware audio controls for HP iPAQ 4xxx"); MODULE_LICENSE("GPL");