diff options
Diffstat (limited to 'include/sound/simple_card_utils.h')
| -rw-r--r-- | include/sound/simple_card_utils.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 7e25afce6566..8bc5e2d8b13c 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h | |||
| @@ -1,17 +1,20 @@ | |||
| 1 | /* | 1 | /* SPDX-License-Identifier: GPL-2.0 |
| 2 | * | ||
| 2 | * simple_card_utils.h | 3 | * simple_card_utils.h |
| 3 | * | 4 | * |
| 4 | * Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 5 | * Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | 6 | */ |
| 7 | |||
| 10 | #ifndef __SIMPLE_CARD_UTILS_H | 8 | #ifndef __SIMPLE_CARD_UTILS_H |
| 11 | #define __SIMPLE_CARD_UTILS_H | 9 | #define __SIMPLE_CARD_UTILS_H |
| 12 | 10 | ||
| 13 | #include <sound/soc.h> | 11 | #include <sound/soc.h> |
| 14 | 12 | ||
| 13 | #define asoc_simple_card_init_hp(card, sjack, prefix) \ | ||
| 14 | asoc_simple_card_init_jack(card, sjack, 1, prefix) | ||
| 15 | #define asoc_simple_card_init_mic(card, sjack, prefix) \ | ||
| 16 | asoc_simple_card_init_jack(card, sjack, 0, prefix) | ||
| 17 | |||
| 15 | struct asoc_simple_dai { | 18 | struct asoc_simple_dai { |
| 16 | const char *name; | 19 | const char *name; |
| 17 | unsigned int sysclk; | 20 | unsigned int sysclk; |
| @@ -28,6 +31,12 @@ struct asoc_simple_card_data { | |||
| 28 | u32 convert_channels; | 31 | u32 convert_channels; |
| 29 | }; | 32 | }; |
| 30 | 33 | ||
| 34 | struct asoc_simple_jack { | ||
| 35 | struct snd_soc_jack jack; | ||
| 36 | struct snd_soc_jack_pin pin; | ||
| 37 | struct snd_soc_jack_gpio gpio; | ||
| 38 | }; | ||
| 39 | |||
| 31 | int asoc_simple_card_parse_daifmt(struct device *dev, | 40 | int asoc_simple_card_parse_daifmt(struct device *dev, |
| 32 | struct device_node *node, | 41 | struct device_node *node, |
| 33 | struct device_node *codec, | 42 | struct device_node *codec, |
| @@ -107,4 +116,8 @@ int asoc_simple_card_of_parse_routing(struct snd_soc_card *card, | |||
| 107 | int asoc_simple_card_of_parse_widgets(struct snd_soc_card *card, | 116 | int asoc_simple_card_of_parse_widgets(struct snd_soc_card *card, |
| 108 | char *prefix); | 117 | char *prefix); |
| 109 | 118 | ||
| 119 | int asoc_simple_card_init_jack(struct snd_soc_card *card, | ||
| 120 | struct asoc_simple_jack *sjack, | ||
| 121 | int is_hp, char *prefix); | ||
| 122 | |||
| 110 | #endif /* __SIMPLE_CARD_UTILS_H */ | 123 | #endif /* __SIMPLE_CARD_UTILS_H */ |
