audio: Add support for 192 and 176KHz playback

* SAMPR_CAPS_ALL -> SAMPR_CAPS_ALL_48/96/192
 * All targets claiming SAMPR_CAPS_ALL now get appropriate subset
 * No need to explicitly define HAVE_PLAY_FREQ
 * Rates that are a multiple of 44 or 48KHz can be used for playback

Inspired by a patch by Roman Stolyarov, but substantially rewritten by myself.

Change-Id: Iaca7363521b1cb9921e047ba1004d3cbe9c9c23e
This commit is contained in:
Solomon Peachy 2020-09-30 18:21:38 -04:00
parent c2c59457e1
commit 01650b8bc9
32 changed files with 161 additions and 80 deletions

View File

@ -375,7 +375,7 @@ bool enc_get_caps(const struct encoder_config *cfg,
else
{
/* If no function provided...defaults to all */
caps->samplerate_caps = SAMPR_CAP_ALL;
caps->samplerate_caps = SAMPR_CAP_ALL_192;
caps->channel_caps = CHN_CAP_ALL;
}

View File

@ -3820,7 +3820,29 @@ void audio_set_crossfade(int enable)
#ifdef HAVE_PLAY_FREQ
static unsigned long audio_guess_frequency(struct mp3entry *id3)
{
return (id3->frequency % 4000) ? SAMPR_44 : SAMPR_48;
switch (id3->frequency)
{
#if HAVE_PLAY_FREQ >= 48
case 44100:
return SAMPR_44;
case 48000:
return SAMPR_48;
#endif
#if HAVE_PLAY_FREQ >= 96
case 88200:
return SAMPR_88;
case 96000:
return SAMPR_96;
#endif
#if HAVE_PLAY_FREQ >= 192
case 176400:
return SAMPR_176;
case 192000:
return SAMPR_192;
#endif
default:
return (id3->frequency % 4000) ? SAMPR_44 : SAMPR_48;
}
}
static void audio_change_frequency_callback(unsigned short id, void *data)
@ -3858,7 +3880,15 @@ static void audio_change_frequency_callback(unsigned short id, void *data)
void audio_set_playback_frequency(int setting)
{
#if HAVE_PLAY_FREQ >= 192
static const unsigned long play_sampr[] = { SAMPR_44, SAMPR_48, SAMPR_88, SAMPR_96, SAMPR_176, SAMPR_192 };
#elif HAVE_PLAY_FREQ >= 96
static const unsigned long play_sampr[] = { SAMPR_44, SAMPR_48, SAMPR_88, SAMPR_96 };
#elif HAVE_PLAY_FREQ >= 48
static const unsigned long play_sampr[] = { SAMPR_44, SAMPR_48 };
#else
#error "HAVE_PLAY_FREQ < 48 ??"
#endif
if ((unsigned)setting > ARRAYLEN(play_sampr)) /* [0] is "automatic" */
setting = 0;

View File

@ -879,8 +879,18 @@ const struct settings_list settings[] = {
), /* CHOICE_SETTING( repeat_mode ) */
#ifdef HAVE_PLAY_FREQ
STRINGCHOICE_SETTING(0, play_frequency, LANG_FREQUENCY, 0,
#if HAVE_PLAY_FREQ >= 192
"playback frequency", "auto,44.1 kHz,48 kHz,88.2 kHz,96 kHz,176.4 kHz,192 kHz", NULL, 7,
LANG_AUTOMATIC, TALK_ID_DECIMAL(441, 1, UNIT_KHZ), TALK_ID(48, UNIT_KHZ), TALK_ID_DECIMAL(882, 1, UNIT_KHZ), TALK_ID(96, UNIT_KHZ), TALK_ID_DECIMAL(1764, 1, UNIT_KHZ), TALK_ID(192, UNIT_KHZ)),
#elif HAVE_PLAY_FREQ >= 96
"playback frequency", "auto,44.1 kHz,48 kHz,88.2 kHz,96 kHz", NULL, 5,
LANG_AUTOMATIC, TALK_ID_DECIMAL(441, 1, UNIT_KHZ), TALK_ID(48, UNIT_KHZ), TALK_ID_DECIMAL(882, 1, UNIT_KHZ), TALK_ID(96, UNIT_KHZ)),
#elif HAVE_PLAY_FREQ >= 48
"playback frequency", "auto,44.1 kHz,48 kHz", NULL, 3,
LANG_AUTOMATIC, TALK_ID_DECIMAL(441, 1, UNIT_KHZ), TALK_ID(48, UNIT_KHZ)),
#else
#error "HAVE_PLAY_FREQ < 48???"
#endif
#endif /* HAVE_PLAY_FREQ */
/* LCD */
#ifdef HAVE_LCD_CONTRAST

View File

@ -600,7 +600,7 @@ Lyre prototype 1 */
#elif defined(XDUOO_X20)
#include "config/xduoox20.h"
#else
/* no known platform */
//#error "unknown hwardware platform!"
#endif
#ifdef __PCTOOL__

View File

@ -124,8 +124,7 @@
#define HAVE_SW_TONE_CONTROLS
/* HW codec is flexible */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */

View File

@ -11,12 +11,12 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -9,12 +9,12 @@
#define MODEL_NUMBER 87
#define MODEL_NAME "Creative ZEN Mozaic"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -9,12 +9,12 @@
#define MODEL_NUMBER 92
#define MODEL_NAME "Creative ZEN V"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -9,12 +9,12 @@
#define MODEL_NUMBER 86
#define MODEL_NAME "Creative Zen X-Fi"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -11,12 +11,12 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -11,12 +11,12 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -9,12 +9,12 @@
#define MODEL_NUMBER 94
#define MODEL_NAME "Creative Zen X-Fi Style"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -99,8 +99,7 @@
#define HAVE_SW_TONE_CONTROLS
#define HAVE_SW_VOLUME_CONTROL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
//#define HAVE_MULTIMEDIA_KEYS
#define CONFIG_KEYPAD DX50_PAD

View File

@ -98,8 +98,7 @@
#define HAVE_SW_TONE_CONTROLS
#define HAVE_SW_VOLUME_CONTROL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
//#define HAVE_MULTIMEDIA_KEYS
#define CONFIG_KEYPAD DX50_PAD

View File

@ -11,12 +11,12 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -8,7 +8,7 @@
#define FIRMWARE_OFFSET_FILE_DATA 8
#define FIRMWARE_OFFSET_FILE_CRC 0
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -8,7 +8,7 @@
#define FIRMWARE_OFFSET_FILE_DATA 8
#define FIRMWARE_OFFSET_FILE_CRC 0
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -19,7 +19,7 @@
#define HAVE_HOTSWAP
#endif
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -10,7 +10,7 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -20,7 +20,7 @@
#define HAVE_RDS_CAP
#endif
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -6,7 +6,7 @@
#define MODEL_NUMBER 41
#define MODEL_NAME "Sandisk Sansa e200v2 series"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -11,7 +11,7 @@
/* define boot redirect file name allows booting from external drives */
#define BOOT_REDIR "rockbox_main.fuze"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -13,12 +13,12 @@
/* define boot redirect file name allows booting from external drives */
#define BOOT_REDIR "rockbox_main.fuze+"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_48
/* define this if you have recording possibility */
#define HAVE_RECORDING
#define REC_SAMPR_CAPS SAMPR_CAP_ALL
#define REC_SAMPR_CAPS SAMPR_CAP_ALL_48
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23

View File

@ -11,7 +11,7 @@
/* define boot redirect file name allows booting from external drives */
#define BOOT_REDIR "rockbox_main.fuze2"
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -10,7 +10,7 @@
/* Enable FAT16 support */
#define HAVE_FAT16SUPPORT
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* define this if you have recording possibility */
#define HAVE_RECORDING

View File

@ -11,7 +11,7 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */

View File

@ -11,7 +11,7 @@
/* Define if boot data from bootloader has been enabled for the target */
#define HAVE_BOOTDATA
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */

View File

@ -123,8 +123,7 @@
#define HAVE_SW_TONE_CONTROLS
/* HW codec is flexible */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 2400 /* default battery capacity */

View File

@ -17,9 +17,6 @@
/* ChinaChip NAND FTL */
#define CONFIG_NAND NAND_CC
/* define this if you have access to the quickscreen */
#define HAVE_QUICKSCREEN
@ -112,8 +109,7 @@
#define HAVE_SW_TONE_CONTROLS
/* define the bitmask of hardware sample rates */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_96
#define AB_REPEAT_ENABLE

View File

@ -17,9 +17,6 @@
#define CONFIG_PLATFORM (PLATFORM_HOSTED)
#endif
/* define this if you have a colour LCD */
#define HAVE_LCD_COLOR
@ -72,9 +69,6 @@
/* The number of bytes reserved for loadable plugins */
#define PLUGIN_BUFFER_SIZE 0x100000
#define HAVE_HEADPHONE_DETECTION
/* KeyPad configuration for plugins */
@ -123,8 +117,7 @@
#define HAVE_SW_TONE_CONTROLS
/* HW codec is flexible */
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
#define HAVE_PLAY_FREQ
#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
/* Battery */
#define BATTERY_CAPACITY_DEFAULT 2000 /* default battery capacity */

View File

@ -122,7 +122,6 @@
#include "pcm_sampr.h"
#undef PCM_SAMPR_CONFIG_ONLY
#define PLAY_SAMPR_CAPS (HW_SAMPR_CAPS & (SAMPR_CAP_44 | SAMPR_CAP_48))
/**
* PLAY_SAMPR_MIN: The minimum allowable samplerate for global playback.
* Music won't play at a lower rate.
@ -133,18 +132,30 @@
* as the DSP core. DSP never exceeds *MAX to lessen
* buffer allocation demands and overhead.
*/
#if PLAY_SAMPR_CAPS & (PLAY_SAMPR_CAPS - 1)
#define HAVE_PLAY_FREQ
#if (HW_SAMPR_CAPS & SAMPR_CAP_192)
#define HAVE_PLAY_FREQ 192
# define PLAY_SAMPR_MIN SAMPR_44
# define PLAY_SAMPR_MAX SAMPR_192
# define PLAY_SAMPR_DEFAULT SAMPR_44
# define PLAY_SAMPR_HW_MIN HW_SAMPR_MIN
#elif (HW_SAMPR_CAPS & SAMPR_CAP_96)
#define HAVE_PLAY_FREQ 96
# define PLAY_SAMPR_MIN SAMPR_44
# define PLAY_SAMPR_MAX SAMPR_96
# define PLAY_SAMPR_DEFAULT SAMPR_44
# define PLAY_SAMPR_HW_MIN HW_SAMPR_MIN
#elif ((HW_SAMPR_CAPS & (SAMPR_CAP_48 | SAMPR_CAP_44)) == (SAMPR_CAP_48 | SAMPR_CAP_44))
#define HAVE_PLAY_FREQ 48
# define PLAY_SAMPR_MIN SAMPR_44
# define PLAY_SAMPR_MAX SAMPR_48
# define PLAY_SAMPR_DEFAULT SAMPR_44
# define PLAY_SAMPR_HW_MIN HW_SAMPR_MIN
#elif PLAY_SAMPR_CAPS & SAMPR_CAP_44
#elif (HW_SAMPR_CAPS & SAMPR_CAP_44)
# define PLAY_SAMPR_MIN SAMPR_44
# define PLAY_SAMPR_MAX SAMPR_44
# define PLAY_SAMPR_DEFAULT SAMPR_44
# define PLAY_SAMPR_HW_MIN HW_SAMPR_MIN
#elif PLAY_SAMPR_CAPS & SAMPR_CAP_48
#elif (HW_SAMPR_CAPS & SAMPR_CAP_48)
# define PLAY_SAMPR_MIN SAMPR_48
# define PLAY_SAMPR_MAX SAMPR_48
# define PLAY_SAMPR_DEFAULT SAMPR_48

View File

@ -34,21 +34,25 @@
/* These must be macros for comparison with SAMPR_CAP_* flags by the
preprocessor. Add samplerate index in descending order renumbering
the ones later in the list if any */
#define FREQ_96 0
#define FREQ_88 1
#define FREQ_64 2
#define FREQ_48 3
#define FREQ_44 4
#define FREQ_32 5
#define FREQ_24 6
#define FREQ_22 7
#define FREQ_16 8
#define FREQ_12 9
#define FREQ_11 10
#define FREQ_8 11
#define SAMPR_NUM_FREQ 12
#define FREQ_192 0
#define FREQ_176 1
#define FREQ_96 2
#define FREQ_88 3
#define FREQ_64 4
#define FREQ_48 5
#define FREQ_44 6
#define FREQ_32 7
#define FREQ_24 8
#define FREQ_22 9
#define FREQ_16 10
#define FREQ_12 11
#define FREQ_11 12
#define FREQ_8 13
#define SAMPR_NUM_FREQ 14
/* sample rate values in HZ */
#define SAMPR_192 192000
#define SAMPR_176 176400
#define SAMPR_96 96000
#define SAMPR_88 88200
#define SAMPR_64 64000
@ -63,6 +67,8 @@
#define SAMPR_8 8000
/* sample rate capability bits */
#define SAMPR_CAP_192 (1 << FREQ_192)
#define SAMPR_CAP_176 (1 << FREQ_176)
#define SAMPR_CAP_96 (1 << FREQ_96)
#define SAMPR_CAP_88 (1 << FREQ_88)
#define SAMPR_CAP_64 (1 << FREQ_64)
@ -75,13 +81,25 @@
#define SAMPR_CAP_12 (1 << FREQ_12)
#define SAMPR_CAP_11 (1 << FREQ_11)
#define SAMPR_CAP_8 (1 << FREQ_8)
#define SAMPR_CAP_ALL (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_64 | \
#define SAMPR_CAP_ALL_192 (SAMPR_CAP_192 | SAMPR_CAP_176 | \
SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_64 | \
SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
#define SAMPR_CAP_ALL_96 (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_64 | \
SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
#define SAMPR_CAP_ALL_48 (SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
/* List of sampling rates that are good enough for most purposes. */
#define SAMPR_CAP_ALL_GE_22 (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_64 | \
#define SAMPR_CAP_ALL_GE_22 (SAMPR_CAP_192 | SAMPR_CAP_176 | \
SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_64 | \
SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
SAMPR_CAP_24 | SAMPR_CAP_22)
@ -99,13 +117,29 @@ enum hw_freq_indexes
{
__HW_FREQ_START_INDEX = -1, /* Make sure first in list is 0 */
/* 96000 */
#if (HW_SAMPR_CAPS & SAMPR_CAP_96) /* Macros and enums for each FREQ: */
HW_FREQ_96, /* Index in enumeration */
#define HW_HAVE_96 /* Defined if this FREQ is defined */
#define HW_HAVE_96_(...) __VA_ARGS__ /* Output its parameters for this FREQ */
/* 192000 */
#if (HW_SAMPR_CAPS & SAMPR_CAP_192) /* Macros and enums for each FREQ: */
HW_FREQ_192, /* Index in enumeration */
#define HW_HAVE_192 /* Defined if this FREQ is defined */
#define HW_HAVE_192_(...) __VA_ARGS__ /* Output its parameters for this FREQ */
#else
#define HW_HAVE_96_(...) /* Discards its parameters for this FREQ */
#define HW_HAVE_192_(...) /* Discards its parameters for this FREQ */
#endif
/* 176400 */
#if (HW_SAMPR_CAPS & SAMPR_CAP_176)
HW_FREQ_176,
#define HW_HAVE_176
#define HW_HAVE_176_(...) __VA_ARGS__
#else
#define HW_HAVE_176_(...)
#endif
/* 96000 */
#if (HW_SAMPR_CAPS & SAMPR_CAP_96)
HW_FREQ_96,
#define HW_HAVE_96
#define HW_HAVE_96_(...) __VA_ARGS__
#else
#define HW_HAVE_96_(...)
#endif
/* 88200 */
#if (HW_SAMPR_CAPS & SAMPR_CAP_88)
@ -202,11 +236,22 @@ enum hw_freq_indexes
extern const unsigned long hw_freq_sampr[HW_NUM_FREQ];
#endif /* PCM_SAMPR_CONFIG_ONLY */
#if HW_SAMPR_CAPS & SAMPR_CAP_44
#define HW_FREQ_DEFAULT HW_FREQ_44
#define HW_SAMPR_DEFAULT SAMPR_44
#elif HW_SAMPR_CAPS & SAMPR_CAP_48
#define HW_FREQ_DEFAULT HW_FREQ_48
#define HW_SAMPR_DEFAULT SAMPR_48
#else
#error "Neither 48 or 44KHz supported?"
#endif
#if HW_SAMPR_CAPS & SAMPR_CAP_96
#if HW_SAMPR_CAPS & SAMPR_CAP_192
# define HW_SAMPR_MAX SAMPR_192
#elif HW_SAMPR_CAPS & SAMPR_CAP_176
# define HW_SAMPR_MAX SAMPR_176
#elif HW_SAMPR_CAPS & SAMPR_CAP_96
# define HW_SAMPR_MAX SAMPR_96
#elif HW_SAMPR_CAPS & SAMPR_CAP_88
# define HW_SAMPR_MAX SAMPR_88