blob: c1504f7219fd33fb8879ec3192686fe0dc52b81c [file] [log] [blame]
Christopher N. Hessed23c6b52017-01-28 14:18:10 +01001/*
2 * Copyright (C) 2017 The LineageOS Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Christopher N. Hesse74c317d2017-02-15 09:47:20 +010017#include <telephony/ril.h>
18
Christopher N. Hessed23c6b52017-01-28 14:18:10 +010019#ifndef SAMSUNG_AUDIO_H
20#define SAMSUNG_AUDIO_H
21
22/*
23 * Sound card specific defines.
24 *
25 * This is an example configuration for a WolfsonMicro WM1814 sound card.
26 * Codec: Vegas
27 *
28 * If you driver does not support one of the devices, the id should not be
29 * defined.
30 */
31
32#define MIXER_CARD 0
33#define SOUND_CARD 0
34
35/* Playback */
Christopher N. Hesse8414bd22017-01-30 18:57:20 +010036#define SOUND_DEEP_BUFFER_DEVICE 3
Christopher N. Hessed23c6b52017-01-28 14:18:10 +010037#define SOUND_PLAYBACK_DEVICE 4
38#define SOUND_PLAYBACK_SCO_DEVICE 2
39
40/* Capture */
41#define SOUND_CAPTURE_DEVICE 0
42#define SOUND_CAPTURE_SCO_DEVICE 2
43
Christopher N. Hesse696959d2017-02-02 20:49:55 +010044/* Voice calls */
45#define SOUND_PLAYBACK_VOICE_DEVICE 1
46#define SOUND_CAPTURE_VOICE_DEVICE 1
47
Christopher N. Hesse74c317d2017-02-15 09:47:20 +010048/* Wideband AMR callback */
49#ifndef RIL_UNSOL_SNDMGR_WB_AMR_REPORT
50#ifdef RIL_UNSOL_WB_AMR_STATE
51#define RIL_UNSOL_SNDMGR_WB_AMR_REPORT RIL_UNSOL_WB_AMR_STATE
52#else
53#define RIL_UNSOL_SNDMGR_WB_AMR_REPORT 0
54#endif
55#endif
56
Christopher N. Hessed23c6b52017-01-28 14:18:10 +010057/* Unusupported
58#define SOUND_CAPTURE_LOOPBACK_AEC_DEVICE 1
59#define SOUND_CAPTURE_HOTWORD_DEVICE 0
60*/
61
Andreas Schneiderdc15cec2017-01-30 22:36:25 +010062/*
63 * If the device has stereo speakers and the speakers are arranged on
64 * different sides of the device you can activate this feature by
65 * setting it to 1.
66 */
67#define SWAP_SPEAKER_ON_SCREEN_ROTATION 0
Christopher N. Hessed23c6b52017-01-28 14:18:10 +010068
Andreas Schneider3b643832017-01-31 11:48:22 +010069/*
70 * You can that this to 1 if your kernel supports irq affinity for
71 * fast mode. See /proc/asound/irq_affinity
72 */
73#define SUPPORTS_IRQ_AFFINITY 0
74
Andreas Schneider759368f2017-02-02 16:11:14 +010075/*
76 * The Wolfson/Cirruslogic chips need to shutdown the DAPM route completely
77 * to be able to load a new firmware. Some of these chips need a delay after
78 * shutodown to full poweroff the DSPs.
79 *
80 * A good value to start with is 10ms:
81 *
82 * #define DSP_POWEROFF_DELAY 10 * 1000
83 */
84/* #define DSP_POWEROFF_DELAY 0 */
85
Christopher N. Hessed23c6b52017-01-28 14:18:10 +010086#endif // SAMSUNG_AUDIO_H