From 9581ad39ec15cf20350d01d2787dea0c7db6074d Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Mon, 13 Feb 2006 13:48:08 +0000 Subject: iPod: Audio driver for iPod Video/5G. Rename wm8971_* functions to wmcodec_* to enable unification of the audio code for WM codecs git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8676 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/wm8975.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'firmware/drivers/wm8975.c') diff --git a/firmware/drivers/wm8975.c b/firmware/drivers/wm8975.c index 54e245b61a..51c12f1505 100644 --- a/firmware/drivers/wm8975.c +++ b/firmware/drivers/wm8975.c @@ -41,7 +41,7 @@ #include "wm8975.h" #include "pcf50605.h" -void wm8975_reset(void); +void wmcodec_reset(void); #define IPOD_PCM_LEVEL 0x65 /* -6dB */ @@ -82,7 +82,7 @@ void wm8975_write(int reg, int data) * Initialise the WM8975 for playback via headphone and line out. * Note, I'm using the WM8750 datasheet as its apparently close. */ -int wm8975_init(void) { +int wmcodec_init(void) { /* reset I2C */ i2c_init(); @@ -110,7 +110,7 @@ int wm8975_init(void) { } /* Silently enable / disable audio output */ -void wm8975_enable_output(bool enable) +void wmcodec_enable_output(bool enable) { if (enable) { @@ -141,7 +141,7 @@ void wm8975_enable_output(bool enable) wm8975_write(AINTFCE, 0x42); /* The iPod can handle multiple frequencies, but fix at 44.1KHz for now */ - wm8975_set_sample_rate(WM8975_44100HZ); + wmcodec_set_sample_rate(WM8975_44100HZ); /* set the volume to -6dB */ wm8975_write(LOUT1VOL, IPOD_PCM_LEVEL); @@ -158,13 +158,13 @@ void wm8975_enable_output(bool enable) wm8975_write(MOUTMIX1, 0x0); /* Mono out Mix */ wm8975_write(MOUTMIX2, 0x0); - wm8975_mute(0); + wmcodec_mute(0); } else { - wm8975_mute(1); + wmcodec_mute(1); } } -int wm8975_set_master_vol(int vol_l, int vol_r) +int wmcodec_set_master_vol(int vol_l, int vol_r) { /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ /* 1111111 == +6dB */ @@ -183,7 +183,7 @@ int wm8975_set_master_vol(int vol_l, int vol_r) return 0; } -int wm8975_set_mixer_vol(int channel1, int channel2) +int wmcodec_set_mixer_vol(int channel1, int channel2) { (void)channel1; (void)channel2; @@ -192,7 +192,7 @@ int wm8975_set_mixer_vol(int channel1, int channel2) } /* We are using Linear bass control */ -void wm8975_set_bass(int value) +void wmcodec_set_bass(int value) { int regvalues[]={11, 10, 10, 9, 8, 8, 0xf , 6, 6, 5, 4, 4, 3, 2, 1, 0}; @@ -202,7 +202,7 @@ void wm8975_set_bass(int value) } } -void wm8975_set_treble(int value) +void wmcodec_set_treble(int value) { int regvalues[]={11, 10, 10, 9, 8, 8, 0xf , 6, 6, 5, 4, 4, 3, 2, 1, 0}; @@ -212,7 +212,7 @@ void wm8975_set_treble(int value) } } -int wm8975_mute(int mute) +int wmcodec_mute(int mute) { if (mute) { @@ -227,7 +227,7 @@ int wm8975_mute(int mute) } /* Nice shutdown of WM8975 codec */ -void wm8975_close(void) +void wmcodec_close(void) { /* 1. Set DACMU = 1 to soft-mute the audio DACs. */ wm8975_write(DACCTRL, 0x8); @@ -240,35 +240,35 @@ void wm8975_close(void) } /* Change the order of the noise shaper, 5th order is recommended above 32kHz */ -void wm8975_set_nsorder(int order) +void wmcodec_set_nsorder(int order) { (void)order; } /* Note: Disable output before calling this function */ -void wm8975_set_sample_rate(int sampling_control) { +void wmcodec_set_sample_rate(int sampling_control) { wm8975_write(0x08, sampling_control); } -void wm8975_enable_recording(bool source_mic) { +void wmcodec_enable_recording(bool source_mic) { (void)source_mic; } -void wm8975_disable_recording(void) { +void wmcodec_disable_recording(void) { } -void wm8975_set_recvol(int left, int right, int type) { +void wmcodec_set_recvol(int left, int right, int type) { (void)left; (void)right; (void)type; } -void wm8975_set_monitor(int enable) { +void wmcodec_set_monitor(int enable) { (void)enable; } -- cgit v1.2.3