From b32c05b116ac0640d22fc2c021371865d005cdc1 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Tue, 16 Dec 2008 20:26:25 +0000 Subject: Fix compilation error when no HW freq defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19459 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/wm8731.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'firmware/drivers/audio/wm8731.c') diff --git a/firmware/drivers/audio/wm8731.c b/firmware/drivers/audio/wm8731.c index 2b74d718b0..0499c4e7d2 100644 --- a/firmware/drivers/audio/wm8731.c +++ b/firmware/drivers/audio/wm8731.c @@ -29,12 +29,16 @@ #include "logf.h" #include "system.h" #include "string.h" + +#include "pcm_sampr.h" + #include "audio.h" #include "wmcodec.h" #include "audiohw.h" #include "sound.h" + const struct sound_settings_info audiohw_settings[] = { [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, /* HAVE_SW_TONE_CONTROLS */ @@ -229,12 +233,12 @@ void audiohw_set_frequency(int fsel) /* For 24MHz MCLK */ static const unsigned char srctrl_table[HW_NUM_FREQ] = { - [HW_FREQ_8] = WMC_USB24_8000HZ, - [HW_FREQ_32] = WMC_USB24_32000HZ, - [HW_FREQ_44] = WMC_USB24_44100HZ, - [HW_FREQ_48] = WMC_USB24_48000HZ, - [HW_FREQ_88] = WMC_USB24_88200HZ, - [HW_FREQ_96] = WMC_USB24_96000HZ, + HW_HAVE_8_([HW_FREQ_8] = WMC_USB24_8000HZ,) + HW_HAVE_32_([HW_FREQ_32] = WMC_USB24_32000HZ,) + HW_HAVE_44_([HW_FREQ_44] = WMC_USB24_44100HZ,) + HW_HAVE_48_([HW_FREQ_48] = WMC_USB24_48000HZ,) + HW_HAVE_88_([HW_FREQ_88] = WMC_USB24_88200HZ,) + HW_HAVE_96_([HW_FREQ_96] = WMC_USB24_96000HZ,) }; if ((unsigned)fsel >= HW_NUM_FREQ) -- cgit v1.2.3