diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-03-06 08:25:27 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-03-06 08:25:27 -0500 |
| commit | a52afea68f94d2501b7fe1fa18cc6acf84e35a76 (patch) | |
| tree | 977eb066b9de1bea4e7ce7ea9a5583d00279061f /include/sound | |
| parent | 8b28c93fe5a55873ce22b7126e84eb59290f8603 (diff) | |
| parent | d7e3281b52fea8917fb4a7a5b09df5e6a9d2850c (diff) | |
Merge tag 'asoc-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Changes for v4.1
A selection of changes for v4.1 so far. The main things are:
- Move of jack registration to the card where it belongs.
- Support for DAPM routes specified by both the machine driver and DT.
Diffstat (limited to 'include/sound')
| -rw-r--r-- | include/sound/pcm_params.h | 7 | ||||
| -rw-r--r-- | include/sound/soc.h | 16 |
2 files changed, 20 insertions, 3 deletions
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 3c45f3924ba7..c704357775fc 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h | |||
| @@ -366,4 +366,11 @@ static inline int params_physical_width(const struct snd_pcm_hw_params *p) | |||
| 366 | return snd_pcm_format_physical_width(params_format(p)); | 366 | return snd_pcm_format_physical_width(params_format(p)); |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | static inline void | ||
| 370 | params_set_format(struct snd_pcm_hw_params *p, snd_pcm_format_t fmt) | ||
| 371 | { | ||
| 372 | snd_mask_set(hw_param_mask(p, SNDRV_PCM_HW_PARAM_FORMAT), | ||
| 373 | (__force int)fmt); | ||
| 374 | } | ||
| 375 | |||
| 369 | #endif /* __SOUND_PCM_PARAMS_H */ | 376 | #endif /* __SOUND_PCM_PARAMS_H */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index cf0bb156d6da..b371aef9819f 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -450,8 +450,10 @@ int soc_dai_hw_params(struct snd_pcm_substream *substream, | |||
| 450 | struct snd_soc_dai *dai); | 450 | struct snd_soc_dai *dai); |
| 451 | 451 | ||
| 452 | /* Jack reporting */ | 452 | /* Jack reporting */ |
| 453 | int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type, | 453 | int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type, |
| 454 | struct snd_soc_jack *jack); | 454 | struct snd_soc_jack *jack, struct snd_soc_jack_pin *pins, |
| 455 | unsigned int num_pins); | ||
| 456 | |||
| 455 | void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask); | 457 | void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask); |
| 456 | int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, | 458 | int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, |
| 457 | struct snd_soc_jack_pin *pins); | 459 | struct snd_soc_jack_pin *pins); |
| @@ -659,7 +661,7 @@ struct snd_soc_jack_gpio { | |||
| 659 | struct snd_soc_jack { | 661 | struct snd_soc_jack { |
| 660 | struct mutex mutex; | 662 | struct mutex mutex; |
| 661 | struct snd_jack *jack; | 663 | struct snd_jack *jack; |
| 662 | struct snd_soc_codec *codec; | 664 | struct snd_soc_card *card; |
| 663 | struct list_head pins; | 665 | struct list_head pins; |
| 664 | int status; | 666 | int status; |
| 665 | struct blocking_notifier_head notifier; | 667 | struct blocking_notifier_head notifier; |
| @@ -954,6 +956,9 @@ struct snd_soc_dai_link { | |||
| 954 | unsigned int symmetric_channels:1; | 956 | unsigned int symmetric_channels:1; |
| 955 | unsigned int symmetric_samplebits:1; | 957 | unsigned int symmetric_samplebits:1; |
| 956 | 958 | ||
| 959 | /* Mark this pcm with non atomic ops */ | ||
| 960 | bool nonatomic; | ||
| 961 | |||
| 957 | /* Do not create a PCM for this DAI link (Backend link) */ | 962 | /* Do not create a PCM for this DAI link (Backend link) */ |
| 958 | unsigned int no_pcm:1; | 963 | unsigned int no_pcm:1; |
| 959 | 964 | ||
| @@ -1071,11 +1076,16 @@ struct snd_soc_card { | |||
| 1071 | 1076 | ||
| 1072 | /* | 1077 | /* |
| 1073 | * Card-specific routes and widgets. | 1078 | * Card-specific routes and widgets. |
| 1079 | * Note: of_dapm_xxx for Device Tree; Otherwise for driver build-in. | ||
| 1074 | */ | 1080 | */ |
| 1075 | const struct snd_soc_dapm_widget *dapm_widgets; | 1081 | const struct snd_soc_dapm_widget *dapm_widgets; |
| 1076 | int num_dapm_widgets; | 1082 | int num_dapm_widgets; |
| 1077 | const struct snd_soc_dapm_route *dapm_routes; | 1083 | const struct snd_soc_dapm_route *dapm_routes; |
| 1078 | int num_dapm_routes; | 1084 | int num_dapm_routes; |
| 1085 | const struct snd_soc_dapm_widget *of_dapm_widgets; | ||
| 1086 | int num_of_dapm_widgets; | ||
| 1087 | const struct snd_soc_dapm_route *of_dapm_routes; | ||
| 1088 | int num_of_dapm_routes; | ||
| 1079 | bool fully_routed; | 1089 | bool fully_routed; |
| 1080 | 1090 | ||
| 1081 | struct work_struct deferred_resume_work; | 1091 | struct work_struct deferred_resume_work; |
