Christopher N. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 1 | /* |
| 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. Hesse | 74c317d | 2017-02-15 09:47:20 +0100 | [diff] [blame] | 17 | #include <telephony/ril.h> |
| 18 | |
Christopher N. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 19 | #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. Hesse | 8414bd2 | 2017-01-30 18:57:20 +0100 | [diff] [blame] | 36 | #define SOUND_DEEP_BUFFER_DEVICE 3 |
Christopher N. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 37 | #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. Hesse | 696959d | 2017-02-02 20:49:55 +0100 | [diff] [blame] | 44 | /* Voice calls */ |
| 45 | #define SOUND_PLAYBACK_VOICE_DEVICE 1 |
| 46 | #define SOUND_CAPTURE_VOICE_DEVICE 1 |
| 47 | |
Christopher N. Hesse | 74c317d | 2017-02-15 09:47:20 +0100 | [diff] [blame] | 48 | /* 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. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 57 | /* Unusupported |
| 58 | #define SOUND_CAPTURE_LOOPBACK_AEC_DEVICE 1 |
| 59 | #define SOUND_CAPTURE_HOTWORD_DEVICE 0 |
| 60 | */ |
| 61 | |
Andreas Schneider | dc15cec | 2017-01-30 22:36:25 +0100 | [diff] [blame] | 62 | /* |
| 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. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 68 | |
Andreas Schneider | 3b64383 | 2017-01-31 11:48:22 +0100 | [diff] [blame] | 69 | /* |
| 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 Schneider | 759368f | 2017-02-02 16:11:14 +0100 | [diff] [blame] | 75 | /* |
| 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. Hesse | 0fdef0c | 2017-02-25 01:37:56 +0100 | [diff] [blame^] | 86 | /* |
| 87 | * Some device variants (often T-Mobile) have a separate voice processing IC |
| 88 | * (Audience EarSmart xxx). |
| 89 | * This hooks into the voice call session and enables, configures and disables |
| 90 | * this extra firmware so RX/TX streams can be routed by the driver. |
| 91 | */ |
| 92 | /* #define AUDIENCE_EARSMART_IC */ |
| 93 | |
Christopher N. Hesse | d23c6b5 | 2017-01-28 14:18:10 +0100 | [diff] [blame] | 94 | #endif // SAMSUNG_AUDIO_H |