diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-27 12:25:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-27 12:25:15 -0400 |
commit | 75623437167d9d1ef14acaf6b3fb4ccd38fcbc84 (patch) | |
tree | b7136121995cc6c2b5211a5393b1ad7c179a2f3b /include/sound | |
parent | 70a3eff5768350c0313a9ae70a15da113171d0ab (diff) | |
parent | 636f78581dbd5529a52057973fe2bdfc1c2f528e (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (22 commits)
ALSA: hda - Cirrus Logic CS421x support
ALSA: Make pcm.h self-contained
ALSA: hda - Allow codec-specific set_power_state ops
ALSA: hda - Add post_suspend patch ops
ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM
ALSA: hda - Make sure mute led reflects master mute state
ALSA: hda - Fix invalid mute led state on resume of IDT codecs
ASoC: Revert "ASoC: SAMSUNG: Add I2S0 internal dma driver"
ALSA: hda - Add support of the 4 internal speakers on certain HP laptops
ALSA: Make snd_pcm_debug_name usable outside pcm_lib
ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parser
ASoC: dapm - Add methods to retrieve snd_card and soc_card from dapm context.
ASoC: SAMSUNG: Add I2S0 internal dma driver
ASoC: SAMSUNG: Modify I2S driver to support idma
ASoC: davinci: add missing break statement
ASoC: davinci: fix codec start and stop functions
ASoC: dapm - add DAPM macro for external enum widgets
ASoC: Acknowledge WM8962 interrupts before acting on them
ASoC: sgtl5000: guide user when regulator support is needed
ASoC: sgtl5000: refactor registering internal ldo
...
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 35 | ||||
-rw-r--r-- | include/sound/pcm_params.h | 16 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 6 |
3 files changed, 45 insertions, 12 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e1bad113061..57e71fa33f7 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -507,6 +507,18 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream); | |||
507 | void snd_pcm_vma_notify_data(void *client, void *data); | 507 | void snd_pcm_vma_notify_data(void *client, void *data); |
508 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); | 508 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); |
509 | 509 | ||
510 | |||
511 | #ifdef CONFIG_SND_DEBUG | ||
512 | void snd_pcm_debug_name(struct snd_pcm_substream *substream, | ||
513 | char *name, size_t len); | ||
514 | #else | ||
515 | static inline void | ||
516 | snd_pcm_debug_name(struct snd_pcm_substream *substream, char *buf, size_t size) | ||
517 | { | ||
518 | *buf = 0; | ||
519 | } | ||
520 | #endif | ||
521 | |||
510 | /* | 522 | /* |
511 | * PCM library | 523 | * PCM library |
512 | */ | 524 | */ |
@@ -749,17 +761,18 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc | |||
749 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; | 761 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; |
750 | } | 762 | } |
751 | 763 | ||
752 | #define params_access(p) ((__force snd_pcm_access_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))) | 764 | #define params_channels(p) \ |
753 | #define params_format(p) ((__force snd_pcm_format_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT))) | 765 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min) |
754 | #define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | 766 | #define params_rate(p) \ |
755 | #define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min | 767 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min) |
756 | #define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min | 768 | #define params_period_size(p) \ |
757 | #define params_period_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min | 769 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min) |
758 | #define params_period_bytes(p) ((params_period_size(p)*snd_pcm_format_physical_width(params_format(p))*params_channels(p))/8) | 770 | #define params_periods(p) \ |
759 | #define params_periods(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIODS)->min | 771 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min) |
760 | #define params_buffer_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min | 772 | #define params_buffer_size(p) \ |
761 | #define params_buffer_bytes(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min | 773 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min) |
762 | 774 | #define params_buffer_bytes(p) \ | |
775 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min) | ||
763 | 776 | ||
764 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); | 777 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); |
765 | void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); | 778 | void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); |
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 85cf1cf4f31..f494f1e3c90 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h | |||
@@ -337,5 +337,19 @@ static inline unsigned int sub(unsigned int a, unsigned int b) | |||
337 | return 0; | 337 | return 0; |
338 | } | 338 | } |
339 | 339 | ||
340 | #endif /* __SOUND_PCM_PARAMS_H */ | 340 | #define params_access(p) ((__force snd_pcm_access_t)\ |
341 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_ACCESS))) | ||
342 | #define params_format(p) ((__force snd_pcm_format_t)\ | ||
343 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_FORMAT))) | ||
344 | #define params_subformat(p) \ | ||
345 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | ||
341 | 346 | ||
347 | static inline unsigned int | ||
348 | params_period_bytes(const struct snd_pcm_hw_params *p) | ||
349 | { | ||
350 | return (params_period_size(p) * | ||
351 | snd_pcm_format_physical_width(params_format(p)) * | ||
352 | params_channels(p)) / 8; | ||
353 | } | ||
354 | |||
355 | #endif /* __SOUND_PCM_PARAMS_H */ | ||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e09505c5a49..e0583b7769c 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -266,6 +266,12 @@ | |||
266 | .get = snd_soc_dapm_get_enum_virt, \ | 266 | .get = snd_soc_dapm_get_enum_virt, \ |
267 | .put = snd_soc_dapm_put_enum_virt, \ | 267 | .put = snd_soc_dapm_put_enum_virt, \ |
268 | .private_value = (unsigned long)&xenum } | 268 | .private_value = (unsigned long)&xenum } |
269 | #define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \ | ||
270 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
271 | .info = snd_soc_info_enum_double, \ | ||
272 | .get = xget, \ | ||
273 | .put = xput, \ | ||
274 | .private_value = (unsigned long)&xenum } | ||
269 | #define SOC_DAPM_VALUE_ENUM(xname, xenum) \ | 275 | #define SOC_DAPM_VALUE_ENUM(xname, xenum) \ |
270 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 276 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
271 | .info = snd_soc_info_enum_double, \ | 277 | .info = snd_soc_info_enum_double, \ |