Fixes pulseaudio to allow it to work with the a52 alsa plugin Index: pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/modules/alsa/alsa-sink.c =================================================================== --- pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478.orig/src/modules/alsa/alsa-sink.c 2010-07-12 18:01:57.008568115 +0100 +++ pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/modules/alsa/alsa-sink.c 2010-07-13 07:52:20.303377511 +0100 @@ -607,6 +607,9 @@ if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) { + if (!after_avail && (int) sframes == -EAGAIN) + break; + if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0) continue; @@ -941,7 +944,13 @@ } pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size - u->hwbuf_unused); - pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size); + + if (pa_alsa_pcm_is_hw(u->pcm_handle)) + pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size); + else { + pa_log("Disabling rewind_within_thread for device %s", u->device_name); + pa_sink_set_max_rewind_within_thread(u->sink, 0); + } return 0; } @@ -1883,7 +1892,13 @@ (double) pa_bytes_to_usec(u->hwbuf_size, &ss) / PA_USEC_PER_MSEC); pa_sink_set_max_request(u->sink, u->hwbuf_size); - pa_sink_set_max_rewind(u->sink, u->hwbuf_size); + + if (pa_alsa_pcm_is_hw(u->pcm_handle)) + pa_sink_set_max_rewind(u->sink, u->hwbuf_size); + else { + pa_log("Disabling rewind for device %s", u->device_name); + pa_sink_set_max_rewind(u->sink, 0); + } if (u->use_tsched) { u->tsched_watermark = pa_usec_to_bytes_round_up(pa_bytes_to_usec_round_up(tsched_watermark, &requested_ss), &u->sink->sample_spec); Index: pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/modules/alsa/mixer/profile-sets/default.conf =================================================================== --- pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478.orig/src/modules/alsa/mixer/profile-sets/default.conf 2010-07-12 18:01:56.968569799 +0100 +++ pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/modules/alsa/mixer/profile-sets/default.conf 2010-07-12 18:01:57.128568886 +0100 @@ -120,13 +120,13 @@ priority = 1 [Mapping iec958-ac3-surround-40] -device-strings = a52:%f +device-strings = a52 channel-map = front-left,front-right,rear-left,rear-right priority = 2 direction = output [Mapping iec958-ac3-surround-51] -device-strings = a52:%f +device-strings = a52 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe priority = 3 direction = output Index: pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/daemon/daemon.conf.in =================================================================== --- pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478.orig/src/daemon/daemon.conf.in 2010-07-12 18:01:56.928569526 +0100 +++ pulseaudio-0.9.22~0.9.21+stable-queue-32-g8478/src/daemon/daemon.conf.in 2010-07-12 18:01:57.128568886 +0100 @@ -73,7 +73,7 @@ ; rlimit-rttime = 1000000 ; default-sample-format = s16le -; default-sample-rate = 44100 +default-sample-rate = 48000 ; default-sample-channels = 2 ; default-channel-map = front-left,front-right