summaryrefslogtreecommitdiff
path: root/firmware/export/audio.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/audio.h')
-rw-r--r--firmware/export/audio.h47
1 files changed, 26 insertions, 21 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index ebcb316cd9..a0da846215 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -127,32 +127,37 @@ enum rec_channel_modes
127#define CHN_CAP_ALL (CHN_CAP_STEREO | CHN_CAP_MONO) 127#define CHN_CAP_ALL (CHN_CAP_STEREO | CHN_CAP_MONO)
128#endif /* CONFIG_CODEC == SWCODEC */ 128#endif /* CONFIG_CODEC == SWCODEC */
129 129
130/* audio sources */
131enum audio_sources 130enum audio_sources
132{ 131{
133 AUDIO_SRC_PLAYBACK = -1, /* for audio playback (default) */ 132 AUDIO_SRC_PLAYBACK = -1, /* Virtual source */
134 AUDIO_SRC_MIC, /* monitor mic */ 133 HAVE_MIC_IN_(AUDIO_SRC_MIC,)
135 AUDIO_SRC_LINEIN, /* monitor line in */ 134 HAVE_LINE_IN_(AUDIO_SRC_LINEIN,)
136#ifdef HAVE_SPDIF_IN 135 HAVE_SPDIF_IN_(AUDIO_SRC_SPDIF,)
137 AUDIO_SRC_SPDIF, /* monitor spdif */ 136 HAVE_FMRADIO_IN_(AUDIO_SRC_FMRADIO,)
138#endif 137 AUDIO_NUM_SOURCES,
139#if defined(HAVE_FMRADIO_IN) || CONFIG_TUNER 138 AUDIO_SRC_MAX = AUDIO_NUM_SOURCES-1,
140 AUDIO_SRC_FMRADIO, /* monitor fm radio */ 139 AUDIO_SRC_DEFAULT = AUDIO_SRC_PLAYBACK
141#endif
142 /* define new audio sources above this line */
143 AUDIO_SOURCE_LIST_END,
144 /* AUDIO_SRC_FMRADIO must be declared #if CONFIG_TUNER but is not in
145 the list of recordable sources. HAVE_FMRADIO_IN implies CONFIG_TUNER. */
146#if defined(HAVE_FMRADIO_IN) || (CONFIG_TUNER == 0)
147 AUDIO_NUM_SOURCES = AUDIO_SOURCE_LIST_END,
148#else
149 AUDIO_NUM_SOURCES = AUDIO_SOURCE_LIST_END-1,
150#endif
151 AUDIO_SRC_MAX = AUDIO_NUM_SOURCES-1
152}; 140};
153 141
142#ifdef HAVE_RECORDING
143/* Recordable source implies it has the input as well */
144
145/* For now there's no restrictions on any targets with which inputs
146 are recordable so define them as equivalent - if they do differ,
147 special handling is needed right now. */
148enum rec_sources
149{
150 __REC_SRC_FIRST = -1,
151 HAVE_MIC_REC_(REC_SRC_MIC,)
152 HAVE_LINE_REC_(REC_SRC_LINEIN,)
153 HAVE_SPDIF_REC_(REC_SRC_SPDIF,)
154 HAVE_FMRADIO_REC_(REC_SRC_FMRADIO,)
155 REC_NUM_SOURCES
156};
157#endif /* HAVE_RECORDING */
158
154#if CONFIG_CODEC == SWCODEC 159#if CONFIG_CODEC == SWCODEC
155/* selects an audio source for recording or playback */ 160/* selects a source to monitor for recording or playback */
156#define SRCF_PLAYBACK 0x0000 /* default */ 161#define SRCF_PLAYBACK 0x0000 /* default */
157#define SRCF_RECORDING 0x1000 162#define SRCF_RECORDING 0x1000
158#if CONFIG_TUNER 163#if CONFIG_TUNER