--- /home/adrian/jive/fab4/squeezeplay/src/squeezeplay/src/audio/decode/decode_alsa.c 2009-01-14 21:05:03.000000000 +0000 +++ tmp/work/armv6-poky-linux-gnueabi/squeezeplay-7.4+svnr3925-r8/squeezeplay/src/audio/decode/decode_alsa.c 2009-01-24 23:15:55.000000000 +0000 @@ -333,9 +333,13 @@ } state->period_size = size; - /* iec958 control */ - if ((err = snd_hctl_open(&state->hctl, state->name, 0)) < 0) { - DEBUG_ERROR("snd_hctl_open failed: %s", snd_strerror(err)); + /* iec958 control - playback device only */ + if (!(state->flags & FLAG_STREAM_PLAYBACK)) { + goto skip_iec958; + } + + if ((err = snd_hctl_open(&state->hctl, state->name, SND_CTL_NONBLOCK)) < 0) { + DEBUG_ERROR("snd_hctl_open failed: %s for %s", snd_strerror(err), state->name); goto skip_iec958; } @@ -415,7 +419,7 @@ snd_pcm_status_t *status; int err, first = 1; - DEBUG_TRACE("audio_thread_execute"); + DEBUG_TRACE("audio_thread_execute for device: %s", state->name); status = malloc(snd_pcm_hw_params_sizeof()); @@ -738,7 +742,7 @@ effects_device = NULL; } - DEBUG_TRACE("Playback device: %s\n", playback_device); + DEBUG_TRACE("Playback device: %s", playback_device); lua_getfield(L, 2, "alsaPlaybackBufferTime"); buffer_time = luaL_optinteger(L, -1, ALSA_DEFAULT_BUFFER_TIME); @@ -754,7 +758,7 @@ ); if (effects_device) { - DEBUG_TRACE("Effects device: %s\n", effects_device); + DEBUG_TRACE("Effects device: %s", effects_device); lua_getfield(L, 2, "alsaEffectsBufferTime"); buffer_time = luaL_optinteger(L, -1, ALSA_DEFAULT_BUFFER_TIME);