diff options
| author | Takashi Iwai <tiwai@suse.de> | 2016-09-30 12:40:40 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2016-09-30 12:40:40 -0400 |
| commit | eeea8b40cd2866ca24f25e5ef09225edb076ae45 (patch) | |
| tree | ece5b5287ee2ce53a841b66d0f526947f74d036f /include/sound | |
| parent | 3383c5c395386ac8e258b1a324c72ce850b84a9e (diff) | |
| parent | 513e43efafe329dad7b5794583b67ac898dcbdca (diff) | |
Merge tag 'asoc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.9
Apart from the cleanups done by Morimoto-san this has very much been a
driver focused release with very little generic change:
- A big factoring out of the simple-card code to allow it to be shared
more with the rcar generic card from Kuninori Morimoto.
- Removal of some operations duplicated on the CODEC level, again by
Kuninori Morimoto.
- Lots more machine support for x86 systems.
- New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663.
Diffstat (limited to 'include/sound')
| -rw-r--r-- | include/sound/da7219.h | 2 | ||||
| -rw-r--r-- | include/sound/l3.h | 15 | ||||
| -rw-r--r-- | include/sound/rt5660.h | 31 | ||||
| -rw-r--r-- | include/sound/s3c24xx_uda134x.h | 1 | ||||
| -rw-r--r-- | include/sound/simple_card_utils.h | 35 | ||||
| -rw-r--r-- | include/sound/soc.h | 19 |
6 files changed, 80 insertions, 23 deletions
diff --git a/include/sound/da7219.h b/include/sound/da7219.h index 02876acdc840..409ef1397fd3 100644 --- a/include/sound/da7219.h +++ b/include/sound/da7219.h | |||
| @@ -34,6 +34,8 @@ enum da7219_mic_amp_in_sel { | |||
| 34 | struct da7219_aad_pdata; | 34 | struct da7219_aad_pdata; |
| 35 | 35 | ||
| 36 | struct da7219_pdata { | 36 | struct da7219_pdata { |
| 37 | bool wakeup_source; | ||
| 38 | |||
| 37 | /* Mic */ | 39 | /* Mic */ |
| 38 | enum da7219_micbias_voltage micbias_lvl; | 40 | enum da7219_micbias_voltage micbias_lvl; |
| 39 | enum da7219_mic_amp_in_sel mic_amp_in_sel; | 41 | enum da7219_mic_amp_in_sel mic_amp_in_sel; |
diff --git a/include/sound/l3.h b/include/sound/l3.h index 423a08f0f1b0..1471da22adad 100644 --- a/include/sound/l3.h +++ b/include/sound/l3.h | |||
| @@ -2,9 +2,15 @@ | |||
| 2 | #define _L3_H_ 1 | 2 | #define _L3_H_ 1 |
| 3 | 3 | ||
| 4 | struct l3_pins { | 4 | struct l3_pins { |
| 5 | void (*setdat)(int); | 5 | void (*setdat)(struct l3_pins *, int); |
| 6 | void (*setclk)(int); | 6 | void (*setclk)(struct l3_pins *, int); |
| 7 | void (*setmode)(int); | 7 | void (*setmode)(struct l3_pins *, int); |
| 8 | |||
| 9 | int gpio_data; | ||
| 10 | int gpio_clk; | ||
| 11 | int gpio_mode; | ||
| 12 | int use_gpios; | ||
| 13 | |||
| 8 | int data_hold; | 14 | int data_hold; |
| 9 | int data_setup; | 15 | int data_setup; |
| 10 | int clock_high; | 16 | int clock_high; |
| @@ -13,6 +19,9 @@ struct l3_pins { | |||
| 13 | int mode_setup; | 19 | int mode_setup; |
| 14 | }; | 20 | }; |
| 15 | 21 | ||
| 22 | struct device; | ||
| 23 | |||
| 16 | int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); | 24 | int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); |
| 25 | int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap); | ||
| 17 | 26 | ||
| 18 | #endif | 27 | #endif |
diff --git a/include/sound/rt5660.h b/include/sound/rt5660.h new file mode 100644 index 000000000000..065f83a24db6 --- /dev/null +++ b/include/sound/rt5660.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * linux/sound/rt5660.h -- Platform data for RT5660 | ||
| 3 | * | ||
| 4 | * Copyright 2016 Realtek Semiconductor Corp. | ||
| 5 | * Author: Oder Chiou <oder_chiou@realtek.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_SND_RT5660_H | ||
| 13 | #define __LINUX_SND_RT5660_H | ||
| 14 | |||
| 15 | enum rt5660_dmic1_data_pin { | ||
| 16 | RT5660_DMIC1_NULL, | ||
| 17 | RT5660_DMIC1_DATA_GPIO2, | ||
| 18 | RT5660_DMIC1_DATA_IN1P, | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct rt5660_platform_data { | ||
| 22 | /* IN1 & IN3 can optionally be differential */ | ||
| 23 | bool in1_diff; | ||
| 24 | bool in3_diff; | ||
| 25 | bool use_ldo2; | ||
| 26 | bool poweroff_codec_in_suspend; | ||
| 27 | |||
| 28 | enum rt5660_dmic1_data_pin dmic1_data_pin; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif | ||
diff --git a/include/sound/s3c24xx_uda134x.h b/include/sound/s3c24xx_uda134x.h index 33df4cb909d3..ffaf1f098c8e 100644 --- a/include/sound/s3c24xx_uda134x.h +++ b/include/sound/s3c24xx_uda134x.h | |||
| @@ -7,7 +7,6 @@ struct s3c24xx_uda134x_platform_data { | |||
| 7 | int l3_clk; | 7 | int l3_clk; |
| 8 | int l3_mode; | 8 | int l3_mode; |
| 9 | int l3_data; | 9 | int l3_data; |
| 10 | void (*power) (int); | ||
| 11 | int model; | 10 | int model; |
| 12 | }; | 11 | }; |
| 13 | 12 | ||
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 86088aed9002..fd6412551145 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h | |||
| @@ -27,10 +27,45 @@ int asoc_simple_card_parse_daifmt(struct device *dev, | |||
| 27 | struct device_node *codec, | 27 | struct device_node *codec, |
| 28 | char *prefix, | 28 | char *prefix, |
| 29 | unsigned int *retfmt); | 29 | unsigned int *retfmt); |
| 30 | __printf(3, 4) | ||
| 30 | int asoc_simple_card_set_dailink_name(struct device *dev, | 31 | int asoc_simple_card_set_dailink_name(struct device *dev, |
| 31 | struct snd_soc_dai_link *dai_link, | 32 | struct snd_soc_dai_link *dai_link, |
| 32 | const char *fmt, ...); | 33 | const char *fmt, ...); |
| 33 | int asoc_simple_card_parse_card_name(struct snd_soc_card *card, | 34 | int asoc_simple_card_parse_card_name(struct snd_soc_card *card, |
| 34 | char *prefix); | 35 | char *prefix); |
| 35 | 36 | ||
| 37 | #define asoc_simple_card_parse_clk_cpu(node, dai_link, simple_dai) \ | ||
| 38 | asoc_simple_card_parse_clk(node, dai_link->cpu_of_node, simple_dai) | ||
| 39 | #define asoc_simple_card_parse_clk_codec(node, dai_link, simple_dai) \ | ||
| 40 | asoc_simple_card_parse_clk(node, dai_link->codec_of_node, simple_dai) | ||
| 41 | int asoc_simple_card_parse_clk(struct device_node *node, | ||
| 42 | struct device_node *dai_of_node, | ||
| 43 | struct asoc_simple_dai *simple_dai); | ||
| 44 | |||
| 45 | #define asoc_simple_card_parse_cpu(node, dai_link, \ | ||
| 46 | list_name, cells_name, is_single_link) \ | ||
| 47 | asoc_simple_card_parse_dai(node, &dai_link->cpu_of_node, \ | ||
| 48 | &dai_link->cpu_dai_name, list_name, cells_name, is_single_link) | ||
| 49 | #define asoc_simple_card_parse_codec(node, dai_link, list_name, cells_name) \ | ||
| 50 | asoc_simple_card_parse_dai(node, &dai_link->codec_of_node, \ | ||
| 51 | &dai_link->codec_dai_name, list_name, cells_name, NULL) | ||
| 52 | #define asoc_simple_card_parse_platform(node, dai_link, list_name, cells_name) \ | ||
| 53 | asoc_simple_card_parse_dai(node, &dai_link->platform_of_node, \ | ||
| 54 | NULL, list_name, cells_name, NULL) | ||
| 55 | int asoc_simple_card_parse_dai(struct device_node *node, | ||
| 56 | struct device_node **endpoint_np, | ||
| 57 | const char **dai_name, | ||
| 58 | const char *list_name, | ||
| 59 | const char *cells_name, | ||
| 60 | int *is_single_links); | ||
| 61 | |||
| 62 | int asoc_simple_card_init_dai(struct snd_soc_dai *dai, | ||
| 63 | struct asoc_simple_dai *simple_dai); | ||
| 64 | |||
| 65 | int asoc_simple_card_canonicalize_dailink(struct snd_soc_dai_link *dai_link); | ||
| 66 | void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link, | ||
| 67 | int is_single_links); | ||
| 68 | |||
| 69 | int asoc_simple_card_clean_reference(struct snd_soc_card *card); | ||
| 70 | |||
| 36 | #endif /* __SIMPLE_CARD_CORE_H */ | 71 | #endif /* __SIMPLE_CARD_CORE_H */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 6144882cc96a..4f1c784e44f6 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -898,14 +898,6 @@ struct snd_soc_codec_driver { | |||
| 898 | int (*resume)(struct snd_soc_codec *); | 898 | int (*resume)(struct snd_soc_codec *); |
| 899 | struct snd_soc_component_driver component_driver; | 899 | struct snd_soc_component_driver component_driver; |
| 900 | 900 | ||
| 901 | /* Default control and setup, added after probe() is run */ | ||
| 902 | const struct snd_kcontrol_new *controls; | ||
| 903 | int num_controls; | ||
| 904 | const struct snd_soc_dapm_widget *dapm_widgets; | ||
| 905 | int num_dapm_widgets; | ||
| 906 | const struct snd_soc_dapm_route *dapm_routes; | ||
| 907 | int num_dapm_routes; | ||
| 908 | |||
| 909 | /* codec wide operations */ | 901 | /* codec wide operations */ |
| 910 | int (*set_sysclk)(struct snd_soc_codec *codec, | 902 | int (*set_sysclk)(struct snd_soc_codec *codec, |
| 911 | int clk_id, int source, unsigned int freq, int dir); | 903 | int clk_id, int source, unsigned int freq, int dir); |
| @@ -1547,17 +1539,6 @@ static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platfo | |||
| 1547 | return snd_soc_component_get_drvdata(&platform->component); | 1539 | return snd_soc_component_get_drvdata(&platform->component); |
| 1548 | } | 1540 | } |
| 1549 | 1541 | ||
| 1550 | static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, | ||
| 1551 | void *data) | ||
| 1552 | { | ||
| 1553 | dev_set_drvdata(rtd->dev, data); | ||
| 1554 | } | ||
| 1555 | |||
| 1556 | static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) | ||
| 1557 | { | ||
| 1558 | return dev_get_drvdata(rtd->dev); | ||
| 1559 | } | ||
| 1560 | |||
| 1561 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) | 1542 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) |
| 1562 | { | 1543 | { |
| 1563 | INIT_LIST_HEAD(&card->codec_dev_list); | 1544 | INIT_LIST_HEAD(&card->codec_dev_list); |
