Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372054
b: refs/heads/master
c: 2fc565e
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Apr 25, 2013
1 parent e91e316 commit 3d8cd82
Show file tree
Hide file tree
Showing 85 changed files with 3,273 additions and 1,518 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5cc50fc858a5ab37dc2744d72d7ffed96f23afd8
refs/heads/master: 2fc565e4eaf8fc633bfc741b90e1f28dba732ee1
12 changes: 5 additions & 7 deletions trunk/Documentation/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6164,14 +6164,12 @@ struct _snd_pcm_runtime {

<para>
The macro takes an conditional expression to evaluate.
When <constant>CONFIG_SND_DEBUG</constant>, is set, the
expression is actually evaluated. If it's non-zero, it shows
the warning message such as
When <constant>CONFIG_SND_DEBUG</constant>, is set, if the
expression is non-zero, it shows the warning message such as
<computeroutput>BUG? (xxx)</computeroutput>
normally followed by stack trace. It returns the evaluated
value.
When no <constant>CONFIG_SND_DEBUG</constant> is set, this
macro always returns zero.
normally followed by stack trace.

In both cases it returns the evaluated value.
</para>

</section>
Expand Down
10 changes: 6 additions & 4 deletions trunk/Documentation/sound/alsa/HD-Audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,13 @@ The generic parser supports the following hints:
the corresponding mixer control, if available
- add_stereo_mix_input (bool): add the stereo mix (analog-loopback
mix) to the input mux if available
- add_out_jack_modes (bool): add "xxx Jack Mode" enum controls to each
output jack for allowing to change the headphone amp capability
- add_in_jack_modes (bool): add "xxx Jack Mode" enum controls to each
input jack for allowing to change the mic bias vref
- add_jack_modes (bool): add "xxx Jack Mode" enum controls to each
I/O jack for allowing to change the headphone amp and mic bias VREF
capabilities
- power_down_unused (bool): power down the unused widgets
- add_hp_mic (bool): add the headphone to capture source if possible
- hp_mic_detect (bool): enable/disable the hp/mic shared input for a
single built-in mic case; default true
- mixer_nid (int): specifies the widget NID of the analog-loopback
mixer

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/usb/audio-v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ struct uac2_as_header_descriptor {
__u8 iChannelNames;
} __attribute__((packed));

#define UAC2_FORMAT_TYPE_I_RAW_DATA (1 << 31)

/* 4.10.1.2 Class-Specific AS Isochronous Audio Data Endpoint Descriptor */

struct uac2_iso_endpoint_descriptor {
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/sound/compress_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ struct snd_compr_runtime {
u64 buffer_size;
u32 fragment_size;
u32 fragments;
u64 hw_pointer;
u64 app_pointer;
u64 total_bytes_available;
u64 total_bytes_transferred;
wait_queue_head_t sleep;
Expand Down Expand Up @@ -121,7 +119,7 @@ struct snd_compr_ops {
int (*trigger)(struct snd_compr_stream *stream, int cmd);
int (*pointer)(struct snd_compr_stream *stream,
struct snd_compr_tstamp *tstamp);
int (*copy)(struct snd_compr_stream *stream, const char __user *buf,
int (*copy)(struct snd_compr_stream *stream, char __user *buf,
size_t count);
int (*mmap)(struct snd_compr_stream *stream,
struct vm_area_struct *vma);
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/sound/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
*
* Add a virtual slave control to the given master element created via
* snd_ctl_create_virtual_master() beforehand.
* Returns zero if successful or a negative error code.
*
* All slaves must be the same type (returning the same information
* via info callback). The function doesn't check it, so it's your
Expand All @@ -199,6 +198,8 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
* at most two channels,
* logarithmic volume control (dB level) thus no linear volume,
* master can only attenuate the volume without gain
*
* Return: Zero if successful or a negative error code.
*/
static inline int
snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
Expand All @@ -219,6 +220,8 @@ snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
* When the control peeks the hardware values directly and the value
* can be changed by other means than the put callback of the element,
* this function should be used to keep the value always up-to-date.
*
* Return: Zero if successful or a negative error code.
*/
static inline int
snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
Expand Down
26 changes: 9 additions & 17 deletions trunk/include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int snd_register_device_for_dev(int type, struct snd_card *card,
* This function uses the card's device pointer to link to the
* correct &struct device.
*
* Returns zero if successful, or a negative error code on failure.
* Return: Zero if successful, or a negative error code on failure.
*/
static inline int snd_register_device(int type, struct snd_card *card, int dev,
const struct file_operations *f_ops,
Expand Down Expand Up @@ -379,18 +379,10 @@ void __snd_printk(unsigned int level, const char *file, int line,
* snd_BUG_ON - debugging check macro
* @cond: condition to evaluate
*
* When CONFIG_SND_DEBUG is set, this macro evaluates the given condition,
* and call WARN() and returns the value if it's non-zero.
*
* When CONFIG_SND_DEBUG is not set, this just returns zero, and the given
* condition is ignored.
*
* NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n.
* Thus, don't put any statement that influences on the code behavior,
* such as pre/post increment, to the argument of this macro.
* If you want to evaluate and give a warning, use standard WARN_ON().
* Has the same behavior as WARN_ON when CONFIG_SND_DEBUG is set,
* otherwise just evaluates the conditional and returns the value.
*/
#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
#define snd_BUG_ON(cond) WARN_ON((cond))

#else /* !CONFIG_SND_DEBUG */

Expand All @@ -400,11 +392,11 @@ __printf(2, 3)
static inline void _snd_printd(int level, const char *format, ...) {}

#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(int cond)
{
return 0;
}
#define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */

#define snd_BUG_ON(condition) ({ \
int __ret_warn_on = !!(condition); \
unlikely(__ret_warn_on); \
})

#endif /* CONFIG_SND_DEBUG */

Expand Down
1 change: 1 addition & 0 deletions trunk/include/sound/emu10k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,7 @@ struct snd_emu10k1 {
unsigned int next_free_voice;

const struct firmware *firmware;
const struct firmware *dock_fw;

#ifdef CONFIG_PM_SLEEP
unsigned int *saved_ptr;
Expand Down
25 changes: 16 additions & 9 deletions trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ struct snd_pcm_ops {
#define SNDRV_PCM_FMTBIT_G723_24_1B _SNDRV_PCM_FMTBIT(G723_24_1B)
#define SNDRV_PCM_FMTBIT_G723_40 _SNDRV_PCM_FMTBIT(G723_40)
#define SNDRV_PCM_FMTBIT_G723_40_1B _SNDRV_PCM_FMTBIT(G723_40_1B)
#define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8)
#define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE)

#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE
Expand Down Expand Up @@ -659,7 +661,7 @@ static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime
*
* Checks whether enough free space is available on the playback buffer.
*
* Returns non-zero if available, or zero if not.
* Return: Non-zero if available, or zero if not.
*/
static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
{
Expand All @@ -673,7 +675,7 @@ static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
*
* Checks whether enough capture data is available on the capture buffer.
*
* Returns non-zero if available, or zero if not.
* Return: Non-zero if available, or zero if not.
*/
static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
{
Expand All @@ -685,10 +687,10 @@ static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
* snd_pcm_playback_data - check whether any data exists on the playback buffer
* @substream: the pcm substream instance
*
* Checks whether any data exists on the playback buffer. If stop_threshold
* is bigger or equal to boundary, then this function returns always non-zero.
* Checks whether any data exists on the playback buffer.
*
* Returns non-zero if exists, or zero if not.
* Return: Non-zero if any data exists, or zero if not. If stop_threshold
* is bigger or equal to boundary, then this function returns always non-zero.
*/
static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
{
Expand All @@ -705,7 +707,7 @@ static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
*
* Checks whether the playback buffer is empty.
*
* Returns non-zero if empty, or zero if not.
* Return: Non-zero if empty, or zero if not.
*/
static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
{
Expand All @@ -719,7 +721,7 @@ static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
*
* Checks whether the capture buffer is empty.
*
* Returns non-zero if empty, or zero if not.
* Return: Non-zero if empty, or zero if not.
*/
static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
{
Expand Down Expand Up @@ -852,7 +854,7 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format);
* snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
* @format: the format to check
*
* Returns 1 if the given PCM format is CPU-endian, 0 if
* Return: 1 if the given PCM format is CPU-endian, 0 if
* opposite, or a negative error code if endian not specified.
*/
int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
Expand Down Expand Up @@ -963,7 +965,7 @@ struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
* contiguous in kernel virtual space, but not in physical memory. Use this
* if the buffer is accessed by kernel code but not by device DMA.
*
* Returns 1 if the buffer was changed, 0 if not changed, or a negative error
* Return: 1 if the buffer was changed, 0 if not changed, or a negative error
* code.
*/
static int snd_pcm_lib_alloc_vmalloc_buffer
Expand All @@ -975,6 +977,9 @@ static int snd_pcm_lib_alloc_vmalloc_buffer
*
* This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses
* vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory.
*
* Return: 1 if the buffer was changed, 0 if not changed, or a negative error
* code.
*/
static int snd_pcm_lib_alloc_vmalloc_32_buffer
(struct snd_pcm_substream *substream, size_t size);
Expand Down Expand Up @@ -1070,6 +1075,8 @@ const char *snd_pcm_format_name(snd_pcm_format_t format);
/**
* snd_pcm_stream_str - Get a string naming the direction of a stream
* @substream: the pcm substream instance
*
* Return: A string naming the direction of the stream.
*/
static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
{
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/uapi/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */
#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */
#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_G723_40_1B
#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U16_LE

#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
Expand Down
Loading

0 comments on commit 3d8cd82

Please sign in to comment.