Do not abort on EAGAIN of snd_pcm_writei in alsa-sink 79/54579/2
authorMok Jeongho <jho.mok@samsung.com>
Wed, 16 Dec 2015 07:53:38 +0000 (16:53 +0900)
committerMok Jeongho <jho.mok@samsung.com>
Wed, 16 Dec 2015 09:34:22 +0000 (18:34 +0900)
[Version] 5.0-52
[Profile] Common
[Issue Type] Fix Bug

Change-Id: I13fb9634ff61972298510a432f8a1c9f275ab6ae

packaging/pulseaudio.spec
src/modules/alsa/alsa-sink.c

index 9ff30b3..2865fd7 100644 (file)
@@ -10,7 +10,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          5.0
-Release:          51
+Release:          52
 Group:            Multimedia/Audio
 License:          GPL-2.0+ and LGPL-2.1+
 URL:              http://pulseaudio.org
index dc24d32..293e369 100644 (file)
@@ -813,8 +813,16 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, bool polled, bo
 
             if (PA_UNLIKELY(frames < 0)) {
 
+#ifdef __TIZEN__
+                /* To avoid assert reset for Hawk-P platform because it is able to return EAGAIN code when after_avail is TRUE */
+                if ((int) frames == -EAGAIN) {
+                    pa_log_warn("snd_pcm_writei returned EAGAIN, after_avail : %s", pa_yes_no(after_avail));
+                    break;
+                }
+#else
                 if (!after_avail && (int) frames == -EAGAIN)
                     break;
+#endif
 
                 if ((r = try_recover(u, "snd_pcm_writei", (int) frames)) == 0)
                     continue;