Author: richard
Date: Mon Jan 26 13:51:38 2009
New Revision: 3944

URL: http://svn.slimdevices.com?rev=3944&root=Jive&view=rev
Log:
 r3...@harrypotter (orig r3943):  richard | 2009-01-26 21:50:31 +0000
 Bug: N/A
 Description:
 Alsa fixes (suggested by triode).
 
 

Modified:
    7.4/branches/pango/   (props changed)
    
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c

Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Jan 26 13:51:38 2009
@@ -4,7 +4,7 @@
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:3856
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:3937
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:3943
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c?rev=3944&root=Jive&r1=3943&r2=3944&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c 
(original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c 
Mon Jan 26 13:51:38 2009
@@ -333,7 +333,11 @@
        }
        state->period_size = size;
 
-       /* iec958 control */
+       /* iec958 control for playback device only */
+       if (!(state->flags & FLAG_STREAM_PLAYBACK)) {
+               goto skip_iec958;         
+       }
+
        if ((err = snd_hctl_open(&state->hctl, state->name, 0)) < 0) {
                DEBUG_ERROR("snd_hctl_open failed: %s", snd_strerror(err));
                goto skip_iec958;
@@ -488,7 +492,7 @@
                        frames = size;
 
                        if ((err = snd_pcm_mmap_begin(state->pcm, &areas, 
&offset, &frames)) < 0) {
-                               if ((err = xrun_recovery(state, avail)) < 0) {
+                               if ((err = xrun_recovery(state, err)) < 0) {
                                        DEBUG_ERROR("mmap begin failed: %s", 
snd_strerror(err));
                                }
                                first = 1;
@@ -512,7 +516,7 @@
 
                        commitres = snd_pcm_mmap_commit(state->pcm, offset, 
frames); 
                        if (commitres < 0 || (snd_pcm_uframes_t)commitres != 
frames) { 
-                               if ((err = xrun_recovery(state, avail)) < 0) {
+                               if ((err = xrun_recovery(state, commitres)) < 
0) {
                                        DEBUG_ERROR("mmap commit failed: %s", 
snd_strerror(err));
                                }
                                first = 1;

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to