Author: richard
Date: Mon Jan 26 13:50:31 2009
New Revision: 3943
URL: http://svn.slimdevices.com?rev=3943&root=Jive&view=rev
Log:
Bug: N/A
Description:
Alsa fixes (suggested by triode).
Modified:
7.4/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c
Modified: 7.4/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c
URL:
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c?rev=3943&root=Jive&r1=3942&r2=3943&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c Mon
Jan 26 13:50:31 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