aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 16:20:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 16:20:50 -0500
commitbae41e45b7400496b9bf0c70c6004419d9987819 (patch)
treecf22a65d119da1c414dbc79518857800fbe7a24b /include
parent7ef58b32f571bffb7763c6252ad7527562081f34 (diff)
parent6e1d7a51392f06899bd7b693f28ac60fa1e00032 (diff)
Merge tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This became a fairly large pull request. In addition to the usual driver updates / fixes, there have been a high amount of cleanups in ASoC area, as well as control API helpers and kernel documentations fixes touching through the whole tree. In the driver side, the biggest changes are the support for new Intel SoC found on new x86 machines, and the updates of FireWire dice and oxfw drivers. Some remarkable items are below: ALSA core: - PCM mmap code cleanup, removal of arch-dependent codes - PCM xrun injection support - PCM hwptr tracepoint support - Refactoring of snd_pcm_action(), simplification of PCM locking - Robustified sequecner auto-load functionality - New control API helpers and lots of cleanups along with them - Lots of kerneldoc fixes and cleanups USB-audio: - The mixer resume code was largely rewritten, and the devices with quirks are resumed properly. - New hardware support: Focusrite Scarlett, Digidesign Mbox1, Denon/Marantz DACs, Zoom R16/24 FireWire: - DICE driver updates with better duplex and sync support, including MIDI support - New OXFW driver for Oxford Semiconductor FW970/971 chipset, including the previous LaCie Speakers device. Fullduplex and MIDI support included as well as DICE driver. HD-audio: - Refactoring the driver-caps quirk handling in snd-hda-intel - More consistent control names representing the topology better - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic fix, ASUS Z99He laptop EAPD ASoC: - Conversion of AC'97 drivers to use regmap, bringing us closer to the removal of the ASoC level I/O code - Clean up a lot of old drivers that were open coding things that have subsequently been implemented in the core - Some DAPM performance improvements - Removal of the now seldom used CODEC mutex - Lots of updates for the newer Intel SoC support, including support for the DSP and some Cherrytrail and Braswell machine drivers - Support for Samsung boards using rt5631 as the CODEC - Removal of the obsolete AFEB9260 machine driver - Driver support for the TI TS3A227E headset driver used in some Chrombeooks Others: - ASIHPI driver update and cleanups - Lots of dev_*() printk conversions - Lots of trivial cleanups for the codes spotted by Coccinelle" * tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits) ALSA: pcxhr: NULL dereference on probe failure ALSA: lola: NULL dereference on probe failure ALSA: hda - Add "eapd" model string for AD1986A codec ALSA: hda - Add EAPD fixup for ASUS Z99He laptop ALSA: oxfw: Add hwdep interface ALSA: oxfw: Add support for capture/playback MIDI messages ALSA: oxfw: add support for capturing PCM samples ALSA: oxfw: Add support AMDTP in-stream ALSA: oxfw: Add support for Behringer/Mackie devices ALSA: oxfw: Change the way to start stream ALSA: oxfw: Add proc interface for debugging purpose ALSA: oxfw: Change the way to make PCM rules/constraints ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation ALSA: oxfw: Change the way to name card ALSA: dice: Add support for MIDI capture/playback ALSA: dice: Add support for capturing PCM samples ALSA: dice: Support for non SYT-Match sampling clock source mode ALSA: dice: Add support for duplex streams with synchronization ALSA: dice: Change the way to start stream ALSA: jack: Add dummy snd_jack_set_key() definition ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/arizona/core.h1
-rw-r--r--include/linux/mfd/davinci_voicecodec.h7
-rw-r--r--include/linux/platform_data/asoc-s3c.h1
-rw-r--r--include/sound/compress_driver.h5
-rw-r--r--include/sound/jack.h26
-rw-r--r--include/sound/pcm.h254
-rw-r--r--include/sound/rcar_snd.h8
-rw-r--r--include/sound/rt5645.h4
-rw-r--r--include/sound/rt5677.h10
-rw-r--r--include/sound/seq_kernel.h4
-rw-r--r--include/sound/soc-dai.h7
-rw-r--r--include/sound/soc-dapm.h9
-rw-r--r--include/sound/soc.h116
-rw-r--r--include/sound/uda134x.h12
-rw-r--r--include/trace/events/asoc.h25
-rw-r--r--include/uapi/sound/asound.h3
-rw-r--r--include/uapi/sound/compress_offload.h17
-rw-r--r--include/uapi/sound/firewire.h3
-rw-r--r--include/uapi/sound/hdspm.h12
19 files changed, 383 insertions, 141 deletions
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h
index f34723f7663c..910e3aa1e965 100644
--- a/include/linux/mfd/arizona/core.h
+++ b/include/linux/mfd/arizona/core.h
@@ -141,6 +141,7 @@ struct arizona {
141 141
142 uint16_t dac_comp_coeff; 142 uint16_t dac_comp_coeff;
143 uint8_t dac_comp_enabled; 143 uint8_t dac_comp_enabled;
144 struct mutex dac_comp_lock;
144}; 145};
145 146
146int arizona_clk32k_enable(struct arizona *arizona); 147int arizona_clk32k_enable(struct arizona *arizona);
diff --git a/include/linux/mfd/davinci_voicecodec.h b/include/linux/mfd/davinci_voicecodec.h
index cb01496bfa49..8e1cdbef3dad 100644
--- a/include/linux/mfd/davinci_voicecodec.h
+++ b/include/linux/mfd/davinci_voicecodec.h
@@ -99,12 +99,6 @@ struct davinci_vcif {
99 dma_addr_t dma_rx_addr; 99 dma_addr_t dma_rx_addr;
100}; 100};
101 101
102struct cq93vc {
103 struct platform_device *pdev;
104 struct snd_soc_codec *codec;
105 u32 sysclk;
106};
107
108struct davinci_vc; 102struct davinci_vc;
109 103
110struct davinci_vc { 104struct davinci_vc {
@@ -122,7 +116,6 @@ struct davinci_vc {
122 116
123 /* Client devices */ 117 /* Client devices */
124 struct davinci_vcif davinci_vcif; 118 struct davinci_vcif davinci_vcif;
125 struct cq93vc cq93vc;
126}; 119};
127 120
128#endif 121#endif
diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h
index a6591c693ebb..5e0bc779e6c5 100644
--- a/include/linux/platform_data/asoc-s3c.h
+++ b/include/linux/platform_data/asoc-s3c.h
@@ -27,6 +27,7 @@ struct samsung_i2s {
27#define QUIRK_NO_MUXPSR (1 << 2) 27#define QUIRK_NO_MUXPSR (1 << 2)
28#define QUIRK_NEED_RSTCLR (1 << 3) 28#define QUIRK_NEED_RSTCLR (1 << 3)
29#define QUIRK_SUPPORTS_TDM (1 << 4) 29#define QUIRK_SUPPORTS_TDM (1 << 4)
30#define QUIRK_SUPPORTS_IDMA (1 << 5)
30 /* Quirks of the I2S controller */ 31 /* Quirks of the I2S controller */
31 u32 quirks; 32 u32 quirks;
32 dma_addr_t idma_addr; 33 dma_addr_t idma_addr;
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
index ae6c3b8ed2f5..396e8f73670a 100644
--- a/include/sound/compress_driver.h
+++ b/include/sound/compress_driver.h
@@ -42,12 +42,11 @@ struct snd_compr_ops;
42 * @buffer_size: size of the above buffer 42 * @buffer_size: size of the above buffer
43 * @fragment_size: size of buffer fragment in bytes 43 * @fragment_size: size of buffer fragment in bytes
44 * @fragments: number of such fragments 44 * @fragments: number of such fragments
45 * @hw_pointer: offset of last location in buffer where DSP copied data
46 * @app_pointer: offset of last location in buffer where app wrote data
47 * @total_bytes_available: cumulative number of bytes made available in 45 * @total_bytes_available: cumulative number of bytes made available in
48 * the ring buffer 46 * the ring buffer
49 * @total_bytes_transferred: cumulative bytes transferred by offload DSP 47 * @total_bytes_transferred: cumulative bytes transferred by offload DSP
50 * @sleep: poll sleep 48 * @sleep: poll sleep
49 * @private_data: driver private data pointer
51 */ 50 */
52struct snd_compr_runtime { 51struct snd_compr_runtime {
53 snd_pcm_state_t state; 52 snd_pcm_state_t state;
@@ -94,6 +93,8 @@ struct snd_compr_stream {
94 * This can be called in during stream creation only to set codec params 93 * This can be called in during stream creation only to set codec params
95 * and the stream properties 94 * and the stream properties
96 * @get_params: retrieve the codec parameters, mandatory 95 * @get_params: retrieve the codec parameters, mandatory
96 * @set_metadata: Set the metadata values for a stream
97 * @get_metadata: retreives the requested metadata values from stream
97 * @trigger: Trigger operations like start, pause, resume, drain, stop. 98 * @trigger: Trigger operations like start, pause, resume, drain, stop.
98 * This callback is mandatory 99 * This callback is mandatory
99 * @pointer: Retrieve current h/w pointer information. Mandatory 100 * @pointer: Retrieve current h/w pointer information. Mandatory
diff --git a/include/sound/jack.h b/include/sound/jack.h
index 58916573db58..218235030ebc 100644
--- a/include/sound/jack.h
+++ b/include/sound/jack.h
@@ -28,8 +28,23 @@
28struct input_dev; 28struct input_dev;
29 29
30/** 30/**
31 * Jack types which can be reported. These values are used as a 31 * enum snd_jack_types - Jack types which can be reported
32 * bitmask. 32 * @SND_JACK_HEADPHONE: Headphone
33 * @SND_JACK_MICROPHONE: Microphone
34 * @SND_JACK_HEADSET: Headset
35 * @SND_JACK_LINEOUT: Line out
36 * @SND_JACK_MECHANICAL: Mechanical switch
37 * @SND_JACK_VIDEOOUT: Video out
38 * @SND_JACK_AVOUT: AV (Audio Video) out
39 * @SND_JACK_LINEIN: Line in
40 * @SND_JACK_BTN_0: Button 0
41 * @SND_JACK_BTN_1: Button 1
42 * @SND_JACK_BTN_2: Button 2
43 * @SND_JACK_BTN_3: Button 3
44 * @SND_JACK_BTN_4: Button 4
45 * @SND_JACK_BTN_5: Button 5
46 *
47 * These values are used as a bitmask.
33 * 48 *
34 * Note that this must be kept in sync with the lookup table in 49 * Note that this must be kept in sync with the lookup table in
35 * sound/core/jack.c. 50 * sound/core/jack.c.
@@ -90,6 +105,13 @@ static inline void snd_jack_set_parent(struct snd_jack *jack,
90{ 105{
91} 106}
92 107
108static inline int snd_jack_set_key(struct snd_jack *jack,
109 enum snd_jack_types type,
110 int keytype)
111{
112 return 0;
113}
114
93static inline void snd_jack_report(struct snd_jack *jack, int status) 115static inline void snd_jack_report(struct snd_jack *jack, int status)
94{ 116{
95} 117}
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 8bb00a27e219..1e7f74acc2ec 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -418,7 +418,10 @@ struct snd_pcm_substream {
418 struct snd_info_entry *proc_status_entry; 418 struct snd_info_entry *proc_status_entry;
419 struct snd_info_entry *proc_prealloc_entry; 419 struct snd_info_entry *proc_prealloc_entry;
420 struct snd_info_entry *proc_prealloc_max_entry; 420 struct snd_info_entry *proc_prealloc_max_entry;
421#ifdef CONFIG_SND_PCM_XRUN_DEBUG
422 struct snd_info_entry *proc_xrun_injection_entry;
421#endif 423#endif
424#endif /* CONFIG_SND_VERBOSE_PROCFS */
422 /* misc flags */ 425 /* misc flags */
423 unsigned int hw_opened: 1; 426 unsigned int hw_opened: 1;
424}; 427};
@@ -505,6 +508,7 @@ int snd_pcm_status(struct snd_pcm_substream *substream,
505int snd_pcm_start(struct snd_pcm_substream *substream); 508int snd_pcm_start(struct snd_pcm_substream *substream);
506int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status); 509int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status);
507int snd_pcm_drain_done(struct snd_pcm_substream *substream); 510int snd_pcm_drain_done(struct snd_pcm_substream *substream);
511int snd_pcm_stop_xrun(struct snd_pcm_substream *substream);
508#ifdef CONFIG_PM 512#ifdef CONFIG_PM
509int snd_pcm_suspend(struct snd_pcm_substream *substream); 513int snd_pcm_suspend(struct snd_pcm_substream *substream);
510int snd_pcm_suspend_all(struct snd_pcm *pcm); 514int snd_pcm_suspend_all(struct snd_pcm *pcm);
@@ -535,6 +539,12 @@ snd_pcm_debug_name(struct snd_pcm_substream *substream, char *buf, size_t size)
535 * PCM library 539 * PCM library
536 */ 540 */
537 541
542/**
543 * snd_pcm_stream_linked - Check whether the substream is linked with others
544 * @substream: substream to check
545 *
546 * Returns true if the given substream is being linked with others.
547 */
538static inline int snd_pcm_stream_linked(struct snd_pcm_substream *substream) 548static inline int snd_pcm_stream_linked(struct snd_pcm_substream *substream)
539{ 549{
540 return substream->group != &substream->self_group; 550 return substream->group != &substream->self_group;
@@ -545,6 +555,16 @@ void snd_pcm_stream_unlock(struct snd_pcm_substream *substream);
545void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream); 555void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream);
546void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream); 556void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream);
547unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream); 557unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
558
559/**
560 * snd_pcm_stream_lock_irqsave - Lock the PCM stream
561 * @substream: PCM substream
562 * @flags: irq flags
563 *
564 * This locks the PCM stream like snd_pcm_stream_lock() but with the local
565 * IRQ (only when nonatomic is false). In nonatomic case, this is identical
566 * as snd_pcm_stream_lock().
567 */
548#define snd_pcm_stream_lock_irqsave(substream, flags) \ 568#define snd_pcm_stream_lock_irqsave(substream, flags) \
549 do { \ 569 do { \
550 typecheck(unsigned long, flags); \ 570 typecheck(unsigned long, flags); \
@@ -553,9 +573,25 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
553void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, 573void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
554 unsigned long flags); 574 unsigned long flags);
555 575
576/**
577 * snd_pcm_group_for_each_entry - iterate over the linked substreams
578 * @s: the iterator
579 * @substream: the substream
580 *
581 * Iterate over the all linked substreams to the given @substream.
582 * When @substream isn't linked with any others, this gives returns @substream
583 * itself once.
584 */
556#define snd_pcm_group_for_each_entry(s, substream) \ 585#define snd_pcm_group_for_each_entry(s, substream) \
557 list_for_each_entry(s, &substream->group->substreams, link_list) 586 list_for_each_entry(s, &substream->group->substreams, link_list)
558 587
588/**
589 * snd_pcm_running - Check whether the substream is in a running state
590 * @substream: substream to check
591 *
592 * Returns true if the given substream is in the state RUNNING, or in the
593 * state DRAINING for playback.
594 */
559static inline int snd_pcm_running(struct snd_pcm_substream *substream) 595static inline int snd_pcm_running(struct snd_pcm_substream *substream)
560{ 596{
561 return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING || 597 return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING ||
@@ -563,45 +599,81 @@ static inline int snd_pcm_running(struct snd_pcm_substream *substream)
563 substream->stream == SNDRV_PCM_STREAM_PLAYBACK)); 599 substream->stream == SNDRV_PCM_STREAM_PLAYBACK));
564} 600}
565 601
602/**
603 * bytes_to_samples - Unit conversion of the size from bytes to samples
604 * @runtime: PCM runtime instance
605 * @size: size in bytes
606 */
566static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size) 607static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size)
567{ 608{
568 return size * 8 / runtime->sample_bits; 609 return size * 8 / runtime->sample_bits;
569} 610}
570 611
612/**
613 * bytes_to_frames - Unit conversion of the size from bytes to frames
614 * @runtime: PCM runtime instance
615 * @size: size in bytes
616 */
571static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size) 617static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size)
572{ 618{
573 return size * 8 / runtime->frame_bits; 619 return size * 8 / runtime->frame_bits;
574} 620}
575 621
622/**
623 * samples_to_bytes - Unit conversion of the size from samples to bytes
624 * @runtime: PCM runtime instance
625 * @size: size in samples
626 */
576static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size) 627static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size)
577{ 628{
578 return size * runtime->sample_bits / 8; 629 return size * runtime->sample_bits / 8;
579} 630}
580 631
632/**
633 * frames_to_bytes - Unit conversion of the size from frames to bytes
634 * @runtime: PCM runtime instance
635 * @size: size in frames
636 */
581static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size) 637static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size)
582{ 638{
583 return size * runtime->frame_bits / 8; 639 return size * runtime->frame_bits / 8;
584} 640}
585 641
642/**
643 * frame_aligned - Check whether the byte size is aligned to frames
644 * @runtime: PCM runtime instance
645 * @bytes: size in bytes
646 */
586static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes) 647static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes)
587{ 648{
588 return bytes % runtime->byte_align == 0; 649 return bytes % runtime->byte_align == 0;
589} 650}
590 651
652/**
653 * snd_pcm_lib_buffer_bytes - Get the buffer size of the current PCM in bytes
654 * @substream: PCM substream
655 */
591static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream) 656static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream)
592{ 657{
593 struct snd_pcm_runtime *runtime = substream->runtime; 658 struct snd_pcm_runtime *runtime = substream->runtime;
594 return frames_to_bytes(runtime, runtime->buffer_size); 659 return frames_to_bytes(runtime, runtime->buffer_size);
595} 660}
596 661
662/**
663 * snd_pcm_lib_period_bytes - Get the period size of the current PCM in bytes
664 * @substream: PCM substream
665 */
597static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream) 666static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream)
598{ 667{
599 struct snd_pcm_runtime *runtime = substream->runtime; 668 struct snd_pcm_runtime *runtime = substream->runtime;
600 return frames_to_bytes(runtime, runtime->period_size); 669 return frames_to_bytes(runtime, runtime->period_size);
601} 670}
602 671
603/* 672/**
604 * result is: 0 ... (boundary - 1) 673 * snd_pcm_playback_avail - Get the available (writable) space for playback
674 * @runtime: PCM runtime instance
675 *
676 * Result is between 0 ... (boundary - 1)
605 */ 677 */
606static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime) 678static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime)
607{ 679{
@@ -613,8 +685,11 @@ static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *r
613 return avail; 685 return avail;
614} 686}
615 687
616/* 688/**
617 * result is: 0 ... (boundary - 1) 689 * snd_pcm_playback_avail - Get the available (readable) space for capture
690 * @runtime: PCM runtime instance
691 *
692 * Result is between 0 ... (boundary - 1)
618 */ 693 */
619static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime) 694static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime)
620{ 695{
@@ -624,11 +699,19 @@ static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *ru
624 return avail; 699 return avail;
625} 700}
626 701
702/**
703 * snd_pcm_playback_hw_avail - Get the queued space for playback
704 * @runtime: PCM runtime instance
705 */
627static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime) 706static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime)
628{ 707{
629 return runtime->buffer_size - snd_pcm_playback_avail(runtime); 708 return runtime->buffer_size - snd_pcm_playback_avail(runtime);
630} 709}
631 710
711/**
712 * snd_pcm_capture_hw_avail - Get the free space for capture
713 * @runtime: PCM runtime instance
714 */
632static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime) 715static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime)
633{ 716{
634 return runtime->buffer_size - snd_pcm_capture_avail(runtime); 717 return runtime->buffer_size - snd_pcm_capture_avail(runtime);
@@ -708,6 +791,20 @@ static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
708 return snd_pcm_capture_avail(runtime) == 0; 791 return snd_pcm_capture_avail(runtime) == 0;
709} 792}
710 793
794/**
795 * snd_pcm_trigger_done - Mark the master substream
796 * @substream: the pcm substream instance
797 * @master: the linked master substream
798 *
799 * When multiple substreams of the same card are linked and the hardware
800 * supports the single-shot operation, the driver calls this in the loop
801 * in snd_pcm_group_for_each_entry() for marking the substream as "done".
802 * Then most of trigger operations are performed only to the given master
803 * substream.
804 *
805 * The trigger_master mark is cleared at timestamp updates at the end
806 * of trigger operations.
807 */
711static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream, 808static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream,
712 struct snd_pcm_substream *master) 809 struct snd_pcm_substream *master)
713{ 810{
@@ -750,18 +847,59 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc
750 return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; 847 return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL];
751} 848}
752 849
753#define params_channels(p) \ 850/**
754 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min) 851 * params_channels - Get the number of channels from the hw params
755#define params_rate(p) \ 852 * @p: hw params
756 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min) 853 */
757#define params_period_size(p) \ 854static inline unsigned int params_channels(const struct snd_pcm_hw_params *p)
758 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min) 855{
759#define params_periods(p) \ 856 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_CHANNELS)->min;
760 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min) 857}
761#define params_buffer_size(p) \ 858
762 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min) 859/**
763#define params_buffer_bytes(p) \ 860 * params_channels - Get the sample rate from the hw params
764 (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min) 861 * @p: hw params
862 */
863static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
864{
865 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_RATE)->min;
866}
867
868/**
869 * params_channels - Get the period size (in frames) from the hw params
870 * @p: hw params
871 */
872static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
873{
874 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min;
875}
876
877/**
878 * params_channels - Get the number of periods from the hw params
879 * @p: hw params
880 */
881static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
882{
883 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_PERIODS)->min;
884}
885
886/**
887 * params_channels - Get the buffer size (in frames) from the hw params
888 * @p: hw params
889 */
890static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
891{
892 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min;
893}
894
895/**
896 * params_channels - Get the buffer size (in bytes) from the hw params
897 * @p: hw params
898 */
899static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p)
900{
901 return hw_param_interval_c(p, SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min;
902}
765 903
766int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); 904int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v);
767void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); 905void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c);
@@ -883,6 +1021,14 @@ unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit);
883unsigned int snd_pcm_rate_mask_intersect(unsigned int rates_a, 1021unsigned int snd_pcm_rate_mask_intersect(unsigned int rates_a,
884 unsigned int rates_b); 1022 unsigned int rates_b);
885 1023
1024/**
1025 * snd_pcm_set_runtime_buffer - Set the PCM runtime buffer
1026 * @substream: PCM substream to set
1027 * @bufp: the buffer information, NULL to clear
1028 *
1029 * Copy the buffer information to runtime->dma_buffer when @bufp is non-NULL.
1030 * Otherwise it clears the current buffer information.
1031 */
886static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream, 1032static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
887 struct snd_dma_buffer *bufp) 1033 struct snd_dma_buffer *bufp)
888{ 1034{
@@ -908,6 +1054,11 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream);
908void snd_pcm_timer_init(struct snd_pcm_substream *substream); 1054void snd_pcm_timer_init(struct snd_pcm_substream *substream);
909void snd_pcm_timer_done(struct snd_pcm_substream *substream); 1055void snd_pcm_timer_done(struct snd_pcm_substream *substream);
910 1056
1057/**
1058 * snd_pcm_gettime - Fill the timespec depending on the timestamp mode
1059 * @runtime: PCM runtime instance
1060 * @tv: timespec to fill
1061 */
911static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, 1062static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime,
912 struct timespec *tv) 1063 struct timespec *tv)
913{ 1064{
@@ -944,7 +1095,6 @@ int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream,
944int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream); 1095int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream);
945struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream, 1096struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
946 unsigned long offset); 1097 unsigned long offset);
947#if 0 /* for kernel-doc */
948/** 1098/**
949 * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer 1099 * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer
950 * @substream: the substream to allocate the buffer to 1100 * @substream: the substream to allocate the buffer to
@@ -957,8 +1107,13 @@ struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
957 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 1107 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
958 * code. 1108 * code.
959 */ 1109 */
960static int snd_pcm_lib_alloc_vmalloc_buffer 1110static inline int snd_pcm_lib_alloc_vmalloc_buffer
961 (struct snd_pcm_substream *substream, size_t size); 1111 (struct snd_pcm_substream *substream, size_t size)
1112{
1113 return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
1114 GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
1115}
1116
962/** 1117/**
963 * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer 1118 * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer
964 * @substream: the substream to allocate the buffer to 1119 * @substream: the substream to allocate the buffer to
@@ -970,15 +1125,12 @@ static int snd_pcm_lib_alloc_vmalloc_buffer
970 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 1125 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
971 * code. 1126 * code.
972 */ 1127 */
973static int snd_pcm_lib_alloc_vmalloc_32_buffer 1128static inline int snd_pcm_lib_alloc_vmalloc_32_buffer
974 (struct snd_pcm_substream *substream, size_t size); 1129 (struct snd_pcm_substream *substream, size_t size)
975#endif 1130{
976#define snd_pcm_lib_alloc_vmalloc_buffer(subs, size) \ 1131 return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
977 _snd_pcm_lib_alloc_vmalloc_buffer \ 1132 GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
978 (subs, size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO) 1133}
979#define snd_pcm_lib_alloc_vmalloc_32_buffer(subs, size) \
980 _snd_pcm_lib_alloc_vmalloc_buffer \
981 (subs, size, GFP_KERNEL | GFP_DMA32 | __GFP_ZERO)
982 1134
983#define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p) 1135#define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p)
984 1136
@@ -998,18 +1150,35 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream,
998#define snd_pcm_sgbuf_ops_page NULL 1150#define snd_pcm_sgbuf_ops_page NULL
999#endif /* SND_DMA_SGBUF */ 1151#endif /* SND_DMA_SGBUF */
1000 1152
1153/**
1154 * snd_pcm_sgbuf_get_addr - Get the DMA address at the corresponding offset
1155 * @substream: PCM substream
1156 * @ofs: byte offset
1157 */
1001static inline dma_addr_t 1158static inline dma_addr_t
1002snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs) 1159snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs)
1003{ 1160{
1004 return snd_sgbuf_get_addr(snd_pcm_get_dma_buf(substream), ofs); 1161 return snd_sgbuf_get_addr(snd_pcm_get_dma_buf(substream), ofs);
1005} 1162}
1006 1163
1164/**
1165 * snd_pcm_sgbuf_get_ptr - Get the virtual address at the corresponding offset
1166 * @substream: PCM substream
1167 * @ofs: byte offset
1168 */
1007static inline void * 1169static inline void *
1008snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs) 1170snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs)
1009{ 1171{
1010 return snd_sgbuf_get_ptr(snd_pcm_get_dma_buf(substream), ofs); 1172 return snd_sgbuf_get_ptr(snd_pcm_get_dma_buf(substream), ofs);
1011} 1173}
1012 1174
1175/**
1176 * snd_pcm_sgbuf_chunk_size - Compute the max size that fits within the contig.
1177 * page from the given size
1178 * @substream: PCM substream
1179 * @ofs: byte offset
1180 * @size: byte size to examine
1181 */
1013static inline unsigned int 1182static inline unsigned int
1014snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream, 1183snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
1015 unsigned int ofs, unsigned int size) 1184 unsigned int ofs, unsigned int size)
@@ -1017,13 +1186,24 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
1017 return snd_sgbuf_get_chunk_size(snd_pcm_get_dma_buf(substream), ofs, size); 1186 return snd_sgbuf_get_chunk_size(snd_pcm_get_dma_buf(substream), ofs, size);
1018} 1187}
1019 1188
1020/* handle mmap counter - PCM mmap callback should handle this counter properly */ 1189/**
1190 * snd_pcm_mmap_data_open - increase the mmap counter
1191 * @area: VMA
1192 *
1193 * PCM mmap callback should handle this counter properly
1194 */
1021static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) 1195static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
1022{ 1196{
1023 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; 1197 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
1024 atomic_inc(&substream->mmap_count); 1198 atomic_inc(&substream->mmap_count);
1025} 1199}
1026 1200
1201/**
1202 * snd_pcm_mmap_data_close - decrease the mmap counter
1203 * @area: VMA
1204 *
1205 * PCM mmap callback should handle this counter properly
1206 */
1027static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area) 1207static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
1028{ 1208{
1029 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; 1209 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
@@ -1043,6 +1223,11 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
1043 1223
1044#define snd_pcm_lib_mmap_vmalloc NULL 1224#define snd_pcm_lib_mmap_vmalloc NULL
1045 1225
1226/**
1227 * snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
1228 * @dma: DMA number
1229 * @max: pointer to store the max size
1230 */
1046static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) 1231static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1047{ 1232{
1048 *max = dma < 4 ? 64 * 1024 : 128 * 1024; 1233 *max = dma < 4 ? 64 * 1024 : 128 * 1024;
@@ -1095,7 +1280,11 @@ struct snd_pcm_chmap {
1095 void *private_data; /* optional: private data pointer */ 1280 void *private_data; /* optional: private data pointer */
1096}; 1281};
1097 1282
1098/* get the PCM substream assigned to the given chmap info */ 1283/**
1284 * snd_pcm_chmap_substream - get the PCM substream assigned to the given chmap info
1285 * @info: chmap information
1286 * @idx: the substream number index
1287 */
1099static inline struct snd_pcm_substream * 1288static inline struct snd_pcm_substream *
1100snd_pcm_chmap_substream(struct snd_pcm_chmap *info, unsigned int idx) 1289snd_pcm_chmap_substream(struct snd_pcm_chmap *info, unsigned int idx)
1101{ 1290{
@@ -1122,7 +1311,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
1122 unsigned long private_value, 1311 unsigned long private_value,
1123 struct snd_pcm_chmap **info_ret); 1312 struct snd_pcm_chmap **info_ret);
1124 1313
1125/* Strong-typed conversion of pcm_format to bitwise */ 1314/**
1315 * pcm_format_to_bits - Strong-typed conversion of pcm_format to bitwise
1316 * @pcm_format: PCM format
1317 */
1126static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format) 1318static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format)
1127{ 1319{
1128 return 1ULL << (__force int) pcm_format; 1320 return 1ULL << (__force int) pcm_format;
diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
index d76412b84b48..83284cae464c 100644
--- a/include/sound/rcar_snd.h
+++ b/include/sound/rcar_snd.h
@@ -36,14 +36,14 @@
36#define RSND_SSI_CLK_PIN_SHARE (1 << 31) 36#define RSND_SSI_CLK_PIN_SHARE (1 << 31)
37#define RSND_SSI_NO_BUSIF (1 << 30) /* SSI+DMA without BUSIF */ 37#define RSND_SSI_NO_BUSIF (1 << 30) /* SSI+DMA without BUSIF */
38 38
39#define RSND_SSI(_dma_id, _pio_irq, _flags) \ 39#define RSND_SSI(_dma_id, _irq, _flags) \
40{ .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags } 40{ .dma_id = _dma_id, .irq = _irq, .flags = _flags }
41#define RSND_SSI_UNUSED \ 41#define RSND_SSI_UNUSED \
42{ .dma_id = -1, .pio_irq = -1, .flags = 0 } 42{ .dma_id = -1, .irq = -1, .flags = 0 }
43 43
44struct rsnd_ssi_platform_info { 44struct rsnd_ssi_platform_info {
45 int dma_id; 45 int dma_id;
46 int pio_irq; 46 int irq;
47 u32 flags; 47 u32 flags;
48}; 48};
49 49
diff --git a/include/sound/rt5645.h b/include/sound/rt5645.h
index a5352712194b..120d9610054e 100644
--- a/include/sound/rt5645.h
+++ b/include/sound/rt5645.h
@@ -23,6 +23,10 @@ struct rt5645_platform_data {
23 23
24 unsigned int hp_det_gpio; 24 unsigned int hp_det_gpio;
25 bool gpio_hp_det_active_high; 25 bool gpio_hp_det_active_high;
26
27 /* true if codec's jd function is used */
28 bool en_jd_func;
29 unsigned int jd_mode;
26}; 30};
27 31
28#endif 32#endif
diff --git a/include/sound/rt5677.h b/include/sound/rt5677.h
index 082670e3a353..d9eb7d861cd0 100644
--- a/include/sound/rt5677.h
+++ b/include/sound/rt5677.h
@@ -27,6 +27,16 @@ struct rt5677_platform_data {
27 bool lout3_diff; 27 bool lout3_diff;
28 /* DMIC2 clock source selection */ 28 /* DMIC2 clock source selection */
29 enum rt5677_dmic2_clk dmic2_clk_pin; 29 enum rt5677_dmic2_clk dmic2_clk_pin;
30
31 /* configures GPIO, 0 - floating, 1 - pulldown, 2 - pullup */
32 u8 gpio_config[6];
33
34 /* jd1 can select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively */
35 unsigned int jd1_gpio;
36 /* jd2 and jd3 can select 0 ~ 3 as
37 OFF, GPIO4, GPIO5 and GPIO6 respectively */
38 unsigned int jd2_gpio;
39 unsigned int jd3_gpio;
30}; 40};
31 41
32#endif 42#endif
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 2398521f0998..eea5400fe373 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -108,9 +108,13 @@ int snd_seq_event_port_detach(int client, int port);
108#ifdef CONFIG_MODULES 108#ifdef CONFIG_MODULES
109void snd_seq_autoload_lock(void); 109void snd_seq_autoload_lock(void);
110void snd_seq_autoload_unlock(void); 110void snd_seq_autoload_unlock(void);
111void snd_seq_autoload_init(void);
112#define snd_seq_autoload_exit() snd_seq_autoload_lock()
111#else 113#else
112#define snd_seq_autoload_lock() 114#define snd_seq_autoload_lock()
113#define snd_seq_autoload_unlock() 115#define snd_seq_autoload_unlock()
116#define snd_seq_autoload_init()
117#define snd_seq_autoload_exit()
114#endif 118#endif
115 119
116#endif /* __SOUND_SEQ_KERNEL_H */ 120#endif /* __SOUND_SEQ_KERNEL_H */
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index e8b3080d196a..2df96b1384c7 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -206,7 +206,6 @@ struct snd_soc_dai_driver {
206 /* DAI description */ 206 /* DAI description */
207 const char *name; 207 const char *name;
208 unsigned int id; 208 unsigned int id;
209 int ac97_control;
210 unsigned int base; 209 unsigned int base;
211 210
212 /* DAI driver callbacks */ 211 /* DAI driver callbacks */
@@ -216,6 +215,8 @@ struct snd_soc_dai_driver {
216 int (*resume)(struct snd_soc_dai *dai); 215 int (*resume)(struct snd_soc_dai *dai);
217 /* compress dai */ 216 /* compress dai */
218 bool compress_dai; 217 bool compress_dai;
218 /* DAI is also used for the control bus */
219 bool bus_control;
219 220
220 /* ops */ 221 /* ops */
221 const struct snd_soc_dai_ops *ops; 222 const struct snd_soc_dai_ops *ops;
@@ -241,7 +242,6 @@ struct snd_soc_dai {
241 const char *name; 242 const char *name;
242 int id; 243 int id;
243 struct device *dev; 244 struct device *dev;
244 void *ac97_pdata; /* platform_data for the ac97 codec */
245 245
246 /* driver ops */ 246 /* driver ops */
247 struct snd_soc_dai_driver *driver; 247 struct snd_soc_dai_driver *driver;
@@ -268,7 +268,6 @@ struct snd_soc_dai {
268 unsigned int sample_bits; 268 unsigned int sample_bits;
269 269
270 /* parent platform/codec */ 270 /* parent platform/codec */
271 struct snd_soc_platform *platform;
272 struct snd_soc_codec *codec; 271 struct snd_soc_codec *codec;
273 struct snd_soc_component *component; 272 struct snd_soc_component *component;
274 273
@@ -276,8 +275,6 @@ struct snd_soc_dai {
276 unsigned int tx_mask; 275 unsigned int tx_mask;
277 unsigned int rx_mask; 276 unsigned int rx_mask;
278 277
279 struct snd_soc_card *card;
280
281 struct list_head list; 278 struct list_head list;
282}; 279};
283 280
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 3a4d7da67b8d..89823cfe6f04 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -435,7 +435,7 @@ void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card);
435unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); 435unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol);
436 436
437/* Mostly internal - should not normally be used */ 437/* Mostly internal - should not normally be used */
438void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); 438void dapm_mark_endpoints_dirty(struct snd_soc_card *card);
439 439
440/* dapm path query */ 440/* dapm path query */
441int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, 441int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
@@ -508,9 +508,9 @@ struct snd_soc_dapm_path {
508 508
509 /* status */ 509 /* status */
510 u32 connect:1; /* source and sink widgets are connected */ 510 u32 connect:1; /* source and sink widgets are connected */
511 u32 walked:1; /* path has been walked */
512 u32 walking:1; /* path is in the process of being walked */ 511 u32 walking:1; /* path is in the process of being walked */
513 u32 weak:1; /* path ignored for power management */ 512 u32 weak:1; /* path ignored for power management */
513 u32 is_supply:1; /* At least one of the connected widgets is a supply */
514 514
515 int (*connected)(struct snd_soc_dapm_widget *source, 515 int (*connected)(struct snd_soc_dapm_widget *source,
516 struct snd_soc_dapm_widget *sink); 516 struct snd_soc_dapm_widget *sink);
@@ -544,11 +544,13 @@ struct snd_soc_dapm_widget {
544 unsigned char active:1; /* active stream on DAC, ADC's */ 544 unsigned char active:1; /* active stream on DAC, ADC's */
545 unsigned char connected:1; /* connected codec pin */ 545 unsigned char connected:1; /* connected codec pin */
546 unsigned char new:1; /* cnew complete */ 546 unsigned char new:1; /* cnew complete */
547 unsigned char ext:1; /* has external widgets */
548 unsigned char force:1; /* force state */ 547 unsigned char force:1; /* force state */
549 unsigned char ignore_suspend:1; /* kept enabled over suspend */ 548 unsigned char ignore_suspend:1; /* kept enabled over suspend */
550 unsigned char new_power:1; /* power from this run */ 549 unsigned char new_power:1; /* power from this run */
551 unsigned char power_checked:1; /* power checked this run */ 550 unsigned char power_checked:1; /* power checked this run */
551 unsigned char is_supply:1; /* Widget is a supply type widget */
552 unsigned char is_sink:1; /* Widget is a sink type widget */
553 unsigned char is_source:1; /* Widget is a source type widget */
552 int subseq; /* sort within widget type */ 554 int subseq; /* sort within widget type */
553 555
554 int (*power_check)(struct snd_soc_dapm_widget *w); 556 int (*power_check)(struct snd_soc_dapm_widget *w);
@@ -567,6 +569,7 @@ struct snd_soc_dapm_widget {
567 struct list_head sinks; 569 struct list_head sinks;
568 570
569 /* used during DAPM updates */ 571 /* used during DAPM updates */
572 struct list_head work_list;
570 struct list_head power_list; 573 struct list_head power_list;
571 struct list_head dirty; 574 struct list_head dirty;
572 int inputs; 575 int inputs;
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 7ba7130037a0..b4fca9aed2a2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -36,6 +36,11 @@
36 {.reg = xreg, .rreg = xreg, .shift = shift_left, \ 36 {.reg = xreg, .rreg = xreg, .shift = shift_left, \
37 .rshift = shift_right, .max = xmax, .platform_max = xmax, \ 37 .rshift = shift_right, .max = xmax, .platform_max = xmax, \
38 .invert = xinvert, .autodisable = xautodisable}) 38 .invert = xinvert, .autodisable = xautodisable})
39#define SOC_DOUBLE_S_VALUE(xreg, shift_left, shift_right, xmin, xmax, xsign_bit, xinvert, xautodisable) \
40 ((unsigned long)&(struct soc_mixer_control) \
41 {.reg = xreg, .rreg = xreg, .shift = shift_left, \
42 .rshift = shift_right, .min = xmin, .max = xmax, .platform_max = xmax, \
43 .sign_bit = xsign_bit, .invert = xinvert, .autodisable = xautodisable})
39#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ 44#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \
40 SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) 45 SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable)
41#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ 46#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
@@ -171,11 +176,9 @@
171 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 176 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
172 SNDRV_CTL_ELEM_ACCESS_READWRITE, \ 177 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
173 .tlv.p = (tlv_array), \ 178 .tlv.p = (tlv_array), \
174 .info = snd_soc_info_volsw_s8, .get = snd_soc_get_volsw_s8, \ 179 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
175 .put = snd_soc_put_volsw_s8, \ 180 .put = snd_soc_put_volsw, \
176 .private_value = (unsigned long)&(struct soc_mixer_control) \ 181 .private_value = SOC_DOUBLE_S_VALUE(xreg, 0, 8, xmin, xmax, 7, 0, 0) }
177 {.reg = xreg, .min = xmin, .max = xmax, \
178 .platform_max = xmax} }
179#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \ 182#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xitems, xtexts) \
180{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ 183{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
181 .items = xitems, .texts = xtexts, \ 184 .items = xitems, .texts = xtexts, \
@@ -366,8 +369,6 @@ struct snd_soc_jack_gpio;
366 369
367typedef int (*hw_write_t)(void *,const char* ,int); 370typedef int (*hw_write_t)(void *,const char* ,int);
368 371
369extern struct snd_ac97_bus_ops *soc_ac97_ops;
370
371enum snd_soc_pcm_subclass { 372enum snd_soc_pcm_subclass {
372 SND_SOC_PCM_CLASS_PCM = 0, 373 SND_SOC_PCM_CLASS_PCM = 0,
373 SND_SOC_PCM_CLASS_BE = 1, 374 SND_SOC_PCM_CLASS_BE = 1,
@@ -409,13 +410,9 @@ int devm_snd_soc_register_component(struct device *dev,
409 const struct snd_soc_component_driver *cmpnt_drv, 410 const struct snd_soc_component_driver *cmpnt_drv,
410 struct snd_soc_dai_driver *dai_drv, int num_dai); 411 struct snd_soc_dai_driver *dai_drv, int num_dai);
411void snd_soc_unregister_component(struct device *dev); 412void snd_soc_unregister_component(struct device *dev);
412int snd_soc_cache_sync(struct snd_soc_codec *codec);
413int snd_soc_cache_init(struct snd_soc_codec *codec); 413int snd_soc_cache_init(struct snd_soc_codec *codec);
414int snd_soc_cache_exit(struct snd_soc_codec *codec); 414int snd_soc_cache_exit(struct snd_soc_codec *codec);
415int snd_soc_cache_write(struct snd_soc_codec *codec, 415
416 unsigned int reg, unsigned int value);
417int snd_soc_cache_read(struct snd_soc_codec *codec,
418 unsigned int reg, unsigned int *value);
419int snd_soc_platform_read(struct snd_soc_platform *platform, 416int snd_soc_platform_read(struct snd_soc_platform *platform,
420 unsigned int reg); 417 unsigned int reg);
421int snd_soc_platform_write(struct snd_soc_platform *platform, 418int snd_soc_platform_write(struct snd_soc_platform *platform,
@@ -500,14 +497,28 @@ int snd_soc_update_bits_locked(struct snd_soc_codec *codec,
500int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, 497int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
501 unsigned int mask, unsigned int value); 498 unsigned int mask, unsigned int value);
502 499
503int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, 500#ifdef CONFIG_SND_SOC_AC97_BUS
504 struct snd_ac97_bus_ops *ops, int num); 501struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec);
505void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); 502void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
506 503
507int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); 504int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
508int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops, 505int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
509 struct platform_device *pdev); 506 struct platform_device *pdev);
510 507
508extern struct snd_ac97_bus_ops *soc_ac97_ops;
509#else
510static inline int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
511 struct platform_device *pdev)
512{
513 return 0;
514}
515
516static inline int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
517{
518 return 0;
519}
520#endif
521
511/* 522/*
512 *Controls 523 *Controls
513 */ 524 */
@@ -545,12 +556,6 @@ int snd_soc_get_volsw_sx(struct snd_kcontrol *kcontrol,
545 struct snd_ctl_elem_value *ucontrol); 556 struct snd_ctl_elem_value *ucontrol);
546int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, 557int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
547 struct snd_ctl_elem_value *ucontrol); 558 struct snd_ctl_elem_value *ucontrol);
548int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol,
549 struct snd_ctl_elem_info *uinfo);
550int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
551 struct snd_ctl_elem_value *ucontrol);
552int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
553 struct snd_ctl_elem_value *ucontrol);
554int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, 559int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
555 struct snd_ctl_elem_info *uinfo); 560 struct snd_ctl_elem_info *uinfo);
556int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, 561int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
@@ -780,24 +785,18 @@ struct snd_soc_codec {
780 struct device *dev; 785 struct device *dev;
781 const struct snd_soc_codec_driver *driver; 786 const struct snd_soc_codec_driver *driver;
782 787
783 struct mutex mutex;
784 struct list_head list; 788 struct list_head list;
785 struct list_head card_list; 789 struct list_head card_list;
786 790
787 /* runtime */ 791 /* runtime */
788 struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
789 unsigned int cache_bypass:1; /* Suppress access to the cache */ 792 unsigned int cache_bypass:1; /* Suppress access to the cache */
790 unsigned int suspended:1; /* Codec is in suspend PM state */ 793 unsigned int suspended:1; /* Codec is in suspend PM state */
791 unsigned int ac97_registered:1; /* Codec has been AC97 registered */
792 unsigned int ac97_created:1; /* Codec has been created by SoC */
793 unsigned int cache_init:1; /* codec cache has been initialized */ 794 unsigned int cache_init:1; /* codec cache has been initialized */
794 u32 cache_sync; /* Cache needs to be synced to hardware */
795 795
796 /* codec IO */ 796 /* codec IO */
797 void *control_data; /* codec control (i2c/3wire) data */ 797 void *control_data; /* codec control (i2c/3wire) data */
798 hw_write_t hw_write; 798 hw_write_t hw_write;
799 void *reg_cache; 799 void *reg_cache;
800 struct mutex cache_rw_mutex;
801 800
802 /* component */ 801 /* component */
803 struct snd_soc_component component; 802 struct snd_soc_component component;
@@ -860,8 +859,6 @@ struct snd_soc_platform_driver {
860 859
861 int (*probe)(struct snd_soc_platform *); 860 int (*probe)(struct snd_soc_platform *);
862 int (*remove)(struct snd_soc_platform *); 861 int (*remove)(struct snd_soc_platform *);
863 int (*suspend)(struct snd_soc_dai *dai);
864 int (*resume)(struct snd_soc_dai *dai);
865 struct snd_soc_component_driver component_driver; 862 struct snd_soc_component_driver component_driver;
866 863
867 /* pcm creation and destruction */ 864 /* pcm creation and destruction */
@@ -886,7 +883,7 @@ struct snd_soc_platform_driver {
886 883
887struct snd_soc_dai_link_component { 884struct snd_soc_dai_link_component {
888 const char *name; 885 const char *name;
889 const struct device_node *of_node; 886 struct device_node *of_node;
890 const char *dai_name; 887 const char *dai_name;
891}; 888};
892 889
@@ -894,8 +891,6 @@ struct snd_soc_platform {
894 struct device *dev; 891 struct device *dev;
895 const struct snd_soc_platform_driver *driver; 892 const struct snd_soc_platform_driver *driver;
896 893
897 unsigned int suspended:1; /* platform is suspended */
898
899 struct list_head list; 894 struct list_head list;
900 895
901 struct snd_soc_component component; 896 struct snd_soc_component component;
@@ -990,7 +985,7 @@ struct snd_soc_codec_conf {
990 * DT/OF node, but not both. 985 * DT/OF node, but not both.
991 */ 986 */
992 const char *dev_name; 987 const char *dev_name;
993 const struct device_node *of_node; 988 struct device_node *of_node;
994 989
995 /* 990 /*
996 * optional map of kcontrol, widget and path name prefixes that are 991 * optional map of kcontrol, widget and path name prefixes that are
@@ -1007,7 +1002,7 @@ struct snd_soc_aux_dev {
1007 * DT/OF node, but not both. 1002 * DT/OF node, but not both.
1008 */ 1003 */
1009 const char *codec_name; 1004 const char *codec_name;
1010 const struct device_node *codec_of_node; 1005 struct device_node *codec_of_node;
1011 1006
1012 /* codec/machine specific init - e.g. add machine controls */ 1007 /* codec/machine specific init - e.g. add machine controls */
1013 int (*init)(struct snd_soc_component *component); 1008 int (*init)(struct snd_soc_component *component);
@@ -1264,6 +1259,17 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
1264int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, 1259int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,
1265 unsigned int val); 1260 unsigned int val);
1266 1261
1262/**
1263 * snd_soc_cache_sync() - Sync the register cache with the hardware
1264 * @codec: CODEC to sync
1265 *
1266 * Note: This function will call regcache_sync()
1267 */
1268static inline int snd_soc_cache_sync(struct snd_soc_codec *codec)
1269{
1270 return regcache_sync(codec->component.regmap);
1271}
1272
1267/* component IO */ 1273/* component IO */
1268int snd_soc_component_read(struct snd_soc_component *component, 1274int snd_soc_component_read(struct snd_soc_component *component,
1269 unsigned int reg, unsigned int *val); 1275 unsigned int reg, unsigned int *val);
@@ -1277,6 +1283,45 @@ void snd_soc_component_async_complete(struct snd_soc_component *component);
1277int snd_soc_component_test_bits(struct snd_soc_component *component, 1283int snd_soc_component_test_bits(struct snd_soc_component *component,
1278 unsigned int reg, unsigned int mask, unsigned int value); 1284 unsigned int reg, unsigned int mask, unsigned int value);
1279 1285
1286#ifdef CONFIG_REGMAP
1287
1288void snd_soc_component_init_regmap(struct snd_soc_component *component,
1289 struct regmap *regmap);
1290void snd_soc_component_exit_regmap(struct snd_soc_component *component);
1291
1292/**
1293 * snd_soc_codec_init_regmap() - Initialize regmap instance for the CODEC
1294 * @codec: The CODEC for which to initialize the regmap instance
1295 * @regmap: The regmap instance that should be used by the CODEC
1296 *
1297 * This function allows deferred assignment of the regmap instance that is
1298 * associated with the CODEC. Only use this if the regmap instance is not yet
1299 * ready when the CODEC is registered. The function must also be called before
1300 * the first IO attempt of the CODEC.
1301 */
1302static inline void snd_soc_codec_init_regmap(struct snd_soc_codec *codec,
1303 struct regmap *regmap)
1304{
1305 snd_soc_component_init_regmap(&codec->component, regmap);
1306}
1307
1308/**
1309 * snd_soc_codec_exit_regmap() - De-initialize regmap instance for the CODEC
1310 * @codec: The CODEC for which to de-initialize the regmap instance
1311 *
1312 * Calls regmap_exit() on the regmap instance associated to the CODEC and
1313 * removes the regmap instance from the CODEC.
1314 *
1315 * This function should only be used if snd_soc_codec_init_regmap() was used to
1316 * initialize the regmap instance.
1317 */
1318static inline void snd_soc_codec_exit_regmap(struct snd_soc_codec *codec)
1319{
1320 snd_soc_component_exit_regmap(&codec->component);
1321}
1322
1323#endif
1324
1280/* device driver data */ 1325/* device driver data */
1281 1326
1282static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, 1327static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
@@ -1451,6 +1496,9 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
1451 struct device_node **framemaster); 1496 struct device_node **framemaster);
1452int snd_soc_of_get_dai_name(struct device_node *of_node, 1497int snd_soc_of_get_dai_name(struct device_node *of_node,
1453 const char **dai_name); 1498 const char **dai_name);
1499int snd_soc_of_get_dai_link_codecs(struct device *dev,
1500 struct device_node *of_node,
1501 struct snd_soc_dai_link *dai_link);
1454 1502
1455#include <sound/soc-dai.h> 1503#include <sound/soc-dai.h>
1456 1504
diff --git a/include/sound/uda134x.h b/include/sound/uda134x.h
index e475659bd3be..509efb050176 100644
--- a/include/sound/uda134x.h
+++ b/include/sound/uda134x.h
@@ -18,18 +18,6 @@ struct uda134x_platform_data {
18 struct l3_pins l3; 18 struct l3_pins l3;
19 void (*power) (int); 19 void (*power) (int);
20 int model; 20 int model;
21 /*
22 ALSA SOC usually puts the device in standby mode when it's not used
23 for sometime. If you unset is_powered_on_standby the driver will
24 turn off the ADC/DAC when this callback is invoked and turn it back
25 on when needed. Unfortunately this will result in a very light bump
26 (it can be audible only with good earphones). If this bothers you
27 set is_powered_on_standby, you will have slightly higher power
28 consumption. Please note that sending the L3 command for ADC is
29 enough to make the bump, so it doesn't make difference if you
30 completely take off power from the codec.
31 */
32 int is_powered_on_standby;
33#define UDA134X_UDA1340 1 21#define UDA134X_UDA1340 1
34#define UDA134X_UDA1341 2 22#define UDA134X_UDA1341 2
35#define UDA134X_UDA1344 3 23#define UDA134X_UDA1344 3
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index b04ee7e5a466..88cf39d96d0f 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -288,31 +288,6 @@ TRACE_EVENT(snd_soc_jack_notify,
288 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) 288 TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
289); 289);
290 290
291TRACE_EVENT(snd_soc_cache_sync,
292
293 TP_PROTO(struct snd_soc_codec *codec, const char *type,
294 const char *status),
295
296 TP_ARGS(codec, type, status),
297
298 TP_STRUCT__entry(
299 __string( name, codec->component.name)
300 __string( status, status )
301 __string( type, type )
302 __field( int, id )
303 ),
304
305 TP_fast_assign(
306 __assign_str(name, codec->component.name);
307 __assign_str(status, status);
308 __assign_str(type, type);
309 __entry->id = codec->component.id;
310 ),
311
312 TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
313 (int)__entry->id, __get_str(type), __get_str(status))
314);
315
316#endif /* _TRACE_ASOC_H */ 291#endif /* _TRACE_ASOC_H */
317 292
318/* This part must be outside protection */ 293/* This part must be outside protection */
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 941d32f007dc..1f23cd635957 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -96,9 +96,10 @@ enum {
96 SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ 96 SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */
97 SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ 97 SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */
98 SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ 98 SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */
99 SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */
99 100
100 /* Don't forget to change the following: */ 101 /* Don't forget to change the following: */
101 SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_BEBOB 102 SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_OXFW
102}; 103};
103 104
104struct snd_hwdep_info { 105struct snd_hwdep_info {
diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h
index 1964026b5e09..22ed8cb7800b 100644
--- a/include/uapi/sound/compress_offload.h
+++ b/include/uapi/sound/compress_offload.h
@@ -32,7 +32,7 @@
32 32
33#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2) 33#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2)
34/** 34/**
35 * struct snd_compressed_buffer: compressed buffer 35 * struct snd_compressed_buffer - compressed buffer
36 * @fragment_size: size of buffer fragment in bytes 36 * @fragment_size: size of buffer fragment in bytes
37 * @fragments: number of such fragments 37 * @fragments: number of such fragments
38 */ 38 */
@@ -42,7 +42,7 @@ struct snd_compressed_buffer {
42} __attribute__((packed, aligned(4))); 42} __attribute__((packed, aligned(4)));
43 43
44/** 44/**
45 * struct snd_compr_params: compressed stream params 45 * struct snd_compr_params - compressed stream params
46 * @buffer: buffer description 46 * @buffer: buffer description
47 * @codec: codec parameters 47 * @codec: codec parameters
48 * @no_wake_mode: dont wake on fragment elapsed 48 * @no_wake_mode: dont wake on fragment elapsed
@@ -54,7 +54,7 @@ struct snd_compr_params {
54} __attribute__((packed, aligned(4))); 54} __attribute__((packed, aligned(4)));
55 55
56/** 56/**
57 * struct snd_compr_tstamp: timestamp descriptor 57 * struct snd_compr_tstamp - timestamp descriptor
58 * @byte_offset: Byte offset in ring buffer to DSP 58 * @byte_offset: Byte offset in ring buffer to DSP
59 * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP 59 * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
60 * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by 60 * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
@@ -73,7 +73,7 @@ struct snd_compr_tstamp {
73} __attribute__((packed, aligned(4))); 73} __attribute__((packed, aligned(4)));
74 74
75/** 75/**
76 * struct snd_compr_avail: avail descriptor 76 * struct snd_compr_avail - avail descriptor
77 * @avail: Number of bytes available in ring buffer for writing/reading 77 * @avail: Number of bytes available in ring buffer for writing/reading
78 * @tstamp: timestamp infomation 78 * @tstamp: timestamp infomation
79 */ 79 */
@@ -88,7 +88,7 @@ enum snd_compr_direction {
88}; 88};
89 89
90/** 90/**
91 * struct snd_compr_caps: caps descriptor 91 * struct snd_compr_caps - caps descriptor
92 * @codecs: pointer to array of codecs 92 * @codecs: pointer to array of codecs
93 * @direction: direction supported. Of type snd_compr_direction 93 * @direction: direction supported. Of type snd_compr_direction
94 * @min_fragment_size: minimum fragment supported by DSP 94 * @min_fragment_size: minimum fragment supported by DSP
@@ -110,7 +110,7 @@ struct snd_compr_caps {
110} __attribute__((packed, aligned(4))); 110} __attribute__((packed, aligned(4)));
111 111
112/** 112/**
113 * struct snd_compr_codec_caps: query capability of codec 113 * struct snd_compr_codec_caps - query capability of codec
114 * @codec: codec for which capability is queried 114 * @codec: codec for which capability is queried
115 * @num_descriptors: number of codec descriptors 115 * @num_descriptors: number of codec descriptors
116 * @descriptor: array of codec capability descriptor 116 * @descriptor: array of codec capability descriptor
@@ -122,18 +122,19 @@ struct snd_compr_codec_caps {
122} __attribute__((packed, aligned(4))); 122} __attribute__((packed, aligned(4)));
123 123
124/** 124/**
125 * enum sndrv_compress_encoder
125 * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the 126 * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the
126 * end of the track 127 * end of the track
127 * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the 128 * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the
128 * beginning of the track 129 * beginning of the track
129 */ 130 */
130enum { 131enum sndrv_compress_encoder {
131 SNDRV_COMPRESS_ENCODER_PADDING = 1, 132 SNDRV_COMPRESS_ENCODER_PADDING = 1,
132 SNDRV_COMPRESS_ENCODER_DELAY = 2, 133 SNDRV_COMPRESS_ENCODER_DELAY = 2,
133}; 134};
134 135
135/** 136/**
136 * struct snd_compr_metadata: compressed stream metadata 137 * struct snd_compr_metadata - compressed stream metadata
137 * @key: key id 138 * @key: key id
138 * @value: key value 139 * @value: key value
139 */ 140 */
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h
index af4bd136c75d..49122df3b56b 100644
--- a/include/uapi/sound/firewire.h
+++ b/include/uapi/sound/firewire.h
@@ -55,7 +55,8 @@ union snd_firewire_event {
55#define SNDRV_FIREWIRE_TYPE_DICE 1 55#define SNDRV_FIREWIRE_TYPE_DICE 1
56#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 56#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
57#define SNDRV_FIREWIRE_TYPE_BEBOB 3 57#define SNDRV_FIREWIRE_TYPE_BEBOB 3
58/* AV/C, RME, MOTU, ... */ 58#define SNDRV_FIREWIRE_TYPE_OXFW 4
59/* RME, MOTU, ... */
59 60
60struct snd_firewire_get_info { 61struct snd_firewire_get_info {
61 unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */ 62 unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */
diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
index d956c3593f65..b357f1a5e29c 100644
--- a/include/uapi/sound/hdspm.h
+++ b/include/uapi/sound/hdspm.h
@@ -74,14 +74,14 @@ struct hdspm_config {
74#define SNDRV_HDSPM_IOCTL_GET_CONFIG \ 74#define SNDRV_HDSPM_IOCTL_GET_CONFIG \
75 _IOR('H', 0x41, struct hdspm_config) 75 _IOR('H', 0x41, struct hdspm_config)
76 76
77/** 77/*
78 * If there's a TCO (TimeCode Option) board installed, 78 * If there's a TCO (TimeCode Option) board installed,
79 * there are further options and status data available. 79 * there are further options and status data available.
80 * The hdspm_ltc structure contains the current SMPTE 80 * The hdspm_ltc structure contains the current SMPTE
81 * timecode and some status information and can be 81 * timecode and some status information and can be
82 * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the 82 * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the
83 * hdspm_status struct. 83 * hdspm_status struct.
84 **/ 84 */
85 85
86enum hdspm_ltc_format { 86enum hdspm_ltc_format {
87 format_invalid, 87 format_invalid,
@@ -113,11 +113,11 @@ struct hdspm_ltc {
113 113
114#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc) 114#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
115 115
116/** 116/*
117 * The status data reflects the device's current state 117 * The status data reflects the device's current state
118 * as determined by the card's configuration and 118 * as determined by the card's configuration and
119 * connection status. 119 * connection status.
120 **/ 120 */
121 121
122enum hdspm_sync { 122enum hdspm_sync {
123 hdspm_sync_no_lock = 0, 123 hdspm_sync_no_lock = 0,
@@ -171,9 +171,9 @@ struct hdspm_status {
171#define SNDRV_HDSPM_IOCTL_GET_STATUS \ 171#define SNDRV_HDSPM_IOCTL_GET_STATUS \
172 _IOR('H', 0x47, struct hdspm_status) 172 _IOR('H', 0x47, struct hdspm_status)
173 173
174/** 174/*
175 * Get information about the card and its add-ons. 175 * Get information about the card and its add-ons.
176 **/ 176 */
177 177
178#define HDSPM_ADDON_TCO 1 178#define HDSPM_ADDON_TCO 1
179 179