Commit 0f17014b authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Takashi Iwai

ALSA: pcm_lib - fix xrun functionality

The commit 4d96eb25 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: default avatarJarkko Nikula <jhnikula@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e1f7f02b
...@@ -148,6 +148,9 @@ static void pcm_debug_name(struct snd_pcm_substream *substream, ...@@ -148,6 +148,9 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,
#define xrun_debug(substream, mask) \ #define xrun_debug(substream, mask) \
((substream)->pstr->xrun_debug & (mask)) ((substream)->pstr->xrun_debug & (mask))
#else
#define xrun_debug(substream, mask) 0
#endif
#define dump_stack_on_xrun(substream) do { \ #define dump_stack_on_xrun(substream) do { \
if (xrun_debug(substream, XRUN_DEBUG_STACK)) \ if (xrun_debug(substream, XRUN_DEBUG_STACK)) \
...@@ -169,6 +172,7 @@ static void xrun(struct snd_pcm_substream *substream) ...@@ -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...) \ #define hw_ptr_error(substream, fmt, args...) \
do { \ do { \
if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \ if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \
...@@ -255,8 +259,6 @@ static void xrun_log_show(struct snd_pcm_substream *substream) ...@@ -255,8 +259,6 @@ static void xrun_log_show(struct snd_pcm_substream *substream)
#else /* ! CONFIG_SND_PCM_XRUN_DEBUG */ #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 hw_ptr_error(substream, fmt, args...) do { } while (0)
#define xrun_log(substream, pos) do { } while (0) #define xrun_log(substream, pos) do { } while (0)
#define xrun_log_show(substream) do { } while (0) #define xrun_log_show(substream) do { } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment