hopefully get the widecabbie theme going again... temporary fix only though
[kugel-rb.git] / firmware / export / sound.h
blob2e13174516bc08ddf24e6300fe97278f08e51007
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef SOUND_H
22 #define SOUND_H
24 #include <inttypes.h>
25 #include <audiohw.h>
27 #if CONFIG_CODEC == SWCODEC
28 enum {
29 DSP_CALLBACK_SET_PRESCALE = 0,
30 DSP_CALLBACK_SET_BASS,
31 DSP_CALLBACK_SET_TREBLE,
32 DSP_CALLBACK_SET_CHANNEL_CONFIG,
33 DSP_CALLBACK_SET_STEREO_WIDTH,
34 #ifdef HAVE_SW_VOLUME_CONTROL
35 DSP_CALLBACK_SET_SW_VOLUME,
36 #endif
38 #endif
40 typedef void sound_set_type(int value);
42 const char *sound_unit(int setting);
43 int sound_numdecimals(int setting);
44 int sound_steps(int setting);
45 int sound_min(int setting);
46 int sound_max(int setting);
47 int sound_default(int setting);
48 sound_set_type* sound_get_fn(int setting);
50 void sound_set_dsp_callback(int (*func)(int, intptr_t));
51 void sound_set_volume(int value);
52 void sound_set_balance(int value);
53 void sound_set_bass(int value);
54 void sound_set_treble(int value);
55 void sound_set_channels(int value);
56 void sound_set_stereo_width(int value);
57 #if defined(HAVE_WM8758) || defined(HAVE_WM8985)
58 void sound_set_bass_cutoff(int value);
59 void sound_set_treble_cutoff(int value);
60 #endif
61 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
62 void sound_set_loudness(int value);
63 void sound_set_avc(int value);
64 void sound_set_mdb_strength(int value);
65 void sound_set_mdb_harmonics(int value);
66 void sound_set_mdb_center(int value);
67 void sound_set_mdb_shape(int value);
68 void sound_set_mdb_enable(int value);
69 void sound_set_superbass(int value);
70 #endif /* (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
72 void sound_set(int setting, int value);
73 int sound_val2phys(int setting, int value);
75 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
76 void sound_set_pitch(int32_t pitch);
77 int32_t sound_get_pitch(void);
78 #endif
80 #ifdef HAVE_PITCHSCREEN
81 /* precision of the pitch and speed variables */
82 /* One zero per decimal (100 means two decimal places */
83 #define PITCH_SPEED_PRECISION 100L
84 #define PITCH_SPEED_100 (100L * PITCH_SPEED_PRECISION) /* 100% speed */
85 #endif /* HAVE_PITCHSCREEN */
87 #endif