aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-27 12:25:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-27 12:25:15 -0400
commit75623437167d9d1ef14acaf6b3fb4ccd38fcbc84 (patch)
treeb7136121995cc6c2b5211a5393b1ad7c179a2f3b /sound/core
parent70a3eff5768350c0313a9ae70a15da113171d0ab (diff)
parent636f78581dbd5529a52057973fe2bdfc1c2f528e (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 'sound/core')
-rw-r--r--sound/core/pcm_lib.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index f1341308beda..86d0caf91b35 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -128,7 +128,8 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram
128 } 128 }
129} 129}
130 130
131static void pcm_debug_name(struct snd_pcm_substream *substream, 131#ifdef CONFIG_SND_DEBUG
132void snd_pcm_debug_name(struct snd_pcm_substream *substream,
132 char *name, size_t len) 133 char *name, size_t len)
133{ 134{
134 snprintf(name, len, "pcmC%dD%d%c:%d", 135 snprintf(name, len, "pcmC%dD%d%c:%d",
@@ -137,6 +138,8 @@ static void pcm_debug_name(struct snd_pcm_substream *substream,
137 substream->stream ? 'c' : 'p', 138 substream->stream ? 'c' : 'p',
138 substream->number); 139 substream->number);
139} 140}
141EXPORT_SYMBOL(snd_pcm_debug_name);
142#endif
140 143
141#define XRUN_DEBUG_BASIC (1<<0) 144#define XRUN_DEBUG_BASIC (1<<0)
142#define XRUN_DEBUG_STACK (1<<1) /* dump also stack */ 145#define XRUN_DEBUG_STACK (1<<1) /* dump also stack */
@@ -168,7 +171,7 @@ static void xrun(struct snd_pcm_substream *substream)
168 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); 171 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
169 if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { 172 if (xrun_debug(substream, XRUN_DEBUG_BASIC)) {
170 char name[16]; 173 char name[16];
171 pcm_debug_name(substream, name, sizeof(name)); 174 snd_pcm_debug_name(substream, name, sizeof(name));
172 snd_printd(KERN_DEBUG "XRUN: %s\n", name); 175 snd_printd(KERN_DEBUG "XRUN: %s\n", name);
173 dump_stack_on_xrun(substream); 176 dump_stack_on_xrun(substream);
174 } 177 }
@@ -243,7 +246,7 @@ static void xrun_log_show(struct snd_pcm_substream *substream)
243 return; 246 return;
244 if (xrun_debug(substream, XRUN_DEBUG_LOGONCE) && log->hit) 247 if (xrun_debug(substream, XRUN_DEBUG_LOGONCE) && log->hit)
245 return; 248 return;
246 pcm_debug_name(substream, name, sizeof(name)); 249 snd_pcm_debug_name(substream, name, sizeof(name));
247 for (cnt = 0, idx = log->idx; cnt < XRUN_LOG_CNT; cnt++) { 250 for (cnt = 0, idx = log->idx; cnt < XRUN_LOG_CNT; cnt++) {
248 entry = &log->entries[idx]; 251 entry = &log->entries[idx];
249 if (entry->period_size == 0) 252 if (entry->period_size == 0)
@@ -319,7 +322,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
319 if (pos >= runtime->buffer_size) { 322 if (pos >= runtime->buffer_size) {
320 if (printk_ratelimit()) { 323 if (printk_ratelimit()) {
321 char name[16]; 324 char name[16];
322 pcm_debug_name(substream, name, sizeof(name)); 325 snd_pcm_debug_name(substream, name, sizeof(name));
323 xrun_log_show(substream); 326 xrun_log_show(substream);
324 snd_printd(KERN_ERR "BUG: %s, pos = %ld, " 327 snd_printd(KERN_ERR "BUG: %s, pos = %ld, "
325 "buffer size = %ld, period size = %ld\n", 328 "buffer size = %ld, period size = %ld\n",
@@ -364,7 +367,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
364 if (xrun_debug(substream, in_interrupt ? 367 if (xrun_debug(substream, in_interrupt ?
365 XRUN_DEBUG_PERIODUPDATE : XRUN_DEBUG_HWPTRUPDATE)) { 368 XRUN_DEBUG_PERIODUPDATE : XRUN_DEBUG_HWPTRUPDATE)) {
366 char name[16]; 369 char name[16];
367 pcm_debug_name(substream, name, sizeof(name)); 370 snd_pcm_debug_name(substream, name, sizeof(name));
368 snd_printd("%s_update: %s: pos=%u/%u/%u, " 371 snd_printd("%s_update: %s: pos=%u/%u/%u, "
369 "hwptr=%ld/%ld/%ld/%ld\n", 372 "hwptr=%ld/%ld/%ld/%ld\n",
370 in_interrupt ? "period" : "hwptr", 373 in_interrupt ? "period" : "hwptr",