aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-12-21 19:38:37 -0500
committerTakashi Iwai <tiwai@suse.de>2011-12-22 02:13:01 -0500
commit0be55c453f0b46de3d4e9025749dbba571cd7b84 (patch)
tree782fa73d51c621f41116b23e4f3d43e5f2a7704e /sound/pci/asihpi
parent8e0874ea72d9dde8d300a5d4d6dfa87238ff7a81 (diff)
ALSA: asihpi - Relax drained check for more reliable playback startup.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r--sound/pci/asihpi/asihpi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 96a6eb0df4a6..d3cab3517180 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -759,8 +759,7 @@ static void snd_card_asihpi_timer_function(unsigned long data)
759 if (s->stream == SNDRV_PCM_STREAM_PLAYBACK) { 759 if (s->stream == SNDRV_PCM_STREAM_PLAYBACK) {
760 pcm_buf_dma_ofs = ds->pcm_buf_host_rw_ofs - bytes_avail; 760 pcm_buf_dma_ofs = ds->pcm_buf_host_rw_ofs - bytes_avail;
761 if (state == HPI_STATE_STOPPED) { 761 if (state == HPI_STATE_STOPPED) {
762 if ((bytes_avail == 0) && 762 if (bytes_avail == 0) {
763 (on_card_bytes < ds->pcm_buf_host_rw_ofs)) {
764 hpi_handle_error(hpi_stream_start(ds->h_stream)); 763 hpi_handle_error(hpi_stream_start(ds->h_stream));
765 snd_printdd("P%d start\n", s->number); 764 snd_printdd("P%d start\n", s->number);
766 ds->drained_count = 0; 765 ds->drained_count = 0;
@@ -769,7 +768,7 @@ static void snd_card_asihpi_timer_function(unsigned long data)
769 snd_printd(KERN_WARNING "P%d drained\n", 768 snd_printd(KERN_WARNING "P%d drained\n",
770 s->number); 769 s->number);
771 ds->drained_count++; 770 ds->drained_count++;
772 if (ds->drained_count > 2) { 771 if (ds->drained_count > 20) {
773 snd_pcm_stop(s, SNDRV_PCM_STATE_XRUN); 772 snd_pcm_stop(s, SNDRV_PCM_STATE_XRUN);
774 continue; 773 continue;
775 } 774 }