Showing error 556

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: sound/core/pcm_native.c
Line in file: 1486
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

1456        snd_pcm_stream_lock_irq(substream);
1457        /* resume pause */
1458        if (substream->runtime->status->state == SNDRV_PCM_STATE_PAUSED)
1459                snd_pcm_pause(substream, 0);
1460
1461        /* pre-start/stop - all running streams are changed to DRAINING state */
1462        result = snd_pcm_action(&snd_pcm_action_drain_init, substream, 0);
1463        if (result < 0) {
1464                snd_pcm_stream_unlock_irq(substream);
1465                goto _error;
1466        }
1467
1468        for (;;) {
1469                long tout;
1470                if (signal_pending(current)) {
1471                        result = -ERESTARTSYS;
1472                        break;
1473                }
1474                /* all finished? */
1475                for (i = 0; i < num_drecs; i++) {
1476                        runtime = drec[i].substream->runtime;
1477                        if (runtime->status->state == SNDRV_PCM_STATE_DRAINING)
1478                                break;
1479                }
1480                if (i == num_drecs)
1481                        break; /* yes, all drained */
1482
1483                set_current_state(TASK_INTERRUPTIBLE);
1484                snd_pcm_stream_unlock_irq(substream);
1485                snd_power_unlock(card);
1486                tout = schedule_timeout(10 * HZ);
1487                snd_power_lock(card);
1488                snd_pcm_stream_lock_irq(substream);
1489                if (tout == 0) {
1490                        if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED)
1491                                result = -ESTRPIPE;
1492                        else {
1493                                snd_printd("playback drain error (DMA or IRQ trouble?)\n");
1494                                snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP);
1495                                result = -EIO;
1496                        }
Show full sources