Skip to content

Commit

Permalink
ALSA: pcm_lib - fix xrun functionality
Browse files Browse the repository at this point in the history
The commit 4d96eb2 broke the interrupt
time xrun functionality (stream stop etc.) if the CONFIG_SND_PCM_XRUN_DEBUG
is not set. This is because the xrun() is null defined without it.

Fix this by letting the function xrun() to be always defined as it was
before.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Jarkko Nikula authored and Takashi Iwai committed Mar 26, 2010
1 parent e1f7f02 commit 0f17014
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,

#define xrun_debug(substream, mask) \
((substream)->pstr->xrun_debug & (mask))
#else
#define xrun_debug(substream, mask) 0
#endif

#define dump_stack_on_xrun(substream) do { \
if (xrun_debug(substream, XRUN_DEBUG_STACK)) \
Expand All @@ -169,6 +172,7 @@ static void xrun(struct snd_pcm_substream *substream)
}
}

#ifdef CONFIG_SND_PCM_XRUN_DEBUG
#define hw_ptr_error(substream, fmt, args...) \
do { \
if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \
Expand Down Expand Up @@ -255,8 +259,6 @@ static void xrun_log_show(struct snd_pcm_substream *substream)

#else /* ! CONFIG_SND_PCM_XRUN_DEBUG */

#define xrun_debug(substream, mask) 0
#define xrun(substream) do { } while (0)
#define hw_ptr_error(substream, fmt, args...) do { } while (0)
#define xrun_log(substream, pos) do { } while (0)
#define xrun_log_show(substream) do { } while (0)
Expand Down

0 comments on commit 0f17014

Please sign in to comment.