| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | #ifndef __SOUND_JACK_H |
|---|
| 2 | 3 | #define __SOUND_JACK_H |
|---|
| 3 | 4 | |
|---|
| .. | .. |
|---|
| 5 | 6 | * Jack abstraction layer |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright 2008 Wolfson Microelectronics plc |
|---|
| 8 | | - * |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | | - * (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public License |
|---|
| 21 | | - * along with this program; if not, write to the Free Software |
|---|
| 22 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 23 | | - * |
|---|
| 24 | 9 | */ |
|---|
| 25 | 10 | |
|---|
| 26 | 11 | #include <sound/core.h> |
|---|
| 12 | +#include <linux/android_kabi.h> |
|---|
| 27 | 13 | |
|---|
| 28 | 14 | struct input_dev; |
|---|
| 29 | 15 | |
|---|
| .. | .. |
|---|
| 58 | 44 | SND_JACK_VIDEOOUT = 0x0010, |
|---|
| 59 | 45 | SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT, |
|---|
| 60 | 46 | SND_JACK_LINEIN = 0x0020, |
|---|
| 61 | | - SND_JACK_OC_HPHL = 0x0040, |
|---|
| 62 | | - SND_JACK_OC_HPHR = 0x0080, |
|---|
| 63 | | - SND_JACK_UNSUPPORTED = 0x0100, |
|---|
| 64 | | - SND_JACK_MICROPHONE2 = 0x0200, |
|---|
| 65 | | - SND_JACK_ANC_HEADPHONE = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE | |
|---|
| 66 | | - SND_JACK_MICROPHONE2, |
|---|
| 67 | 47 | |
|---|
| 68 | 48 | /* Kept separate from switches to facilitate implementation */ |
|---|
| 69 | | - SND_JACK_BTN_0 = 0x8000, |
|---|
| 70 | | - SND_JACK_BTN_1 = 0x4000, |
|---|
| 71 | | - SND_JACK_BTN_2 = 0x2000, |
|---|
| 72 | | - SND_JACK_BTN_3 = 0x1000, |
|---|
| 73 | | - SND_JACK_BTN_4 = 0x0800, |
|---|
| 74 | | - SND_JACK_BTN_5 = 0x0400, |
|---|
| 49 | + SND_JACK_BTN_0 = 0x4000, |
|---|
| 50 | + SND_JACK_BTN_1 = 0x2000, |
|---|
| 51 | + SND_JACK_BTN_2 = 0x1000, |
|---|
| 52 | + SND_JACK_BTN_3 = 0x0800, |
|---|
| 53 | + SND_JACK_BTN_4 = 0x0400, |
|---|
| 54 | + SND_JACK_BTN_5 = 0x0200, |
|---|
| 75 | 55 | }; |
|---|
| 56 | + |
|---|
| 57 | +/* Keep in sync with definitions above */ |
|---|
| 58 | +#define SND_JACK_SWITCH_TYPES 6 |
|---|
| 76 | 59 | |
|---|
| 77 | 60 | struct snd_jack { |
|---|
| 78 | 61 | struct list_head kctl_list; |
|---|
| .. | .. |
|---|
| 87 | 70 | #endif /* CONFIG_SND_JACK_INPUT_DEV */ |
|---|
| 88 | 71 | void *private_data; |
|---|
| 89 | 72 | void (*private_free)(struct snd_jack *); |
|---|
| 73 | + |
|---|
| 74 | + ANDROID_KABI_RESERVE(1); |
|---|
| 90 | 75 | }; |
|---|
| 91 | 76 | |
|---|
| 92 | 77 | #ifdef CONFIG_SND_JACK |
|---|