Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-15 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 New versions of Pulseaudio will be patched, but in the meantime, here are
 the revised steps for Ubuntu Lucid 10.04 LTS:

 {{{
 1. Open from Pulse source code: src/modules/alsa/alsa-sink.c

 2. Replace: pa_sink_set_max_rewind(u-sink, u-hwbuf_size); with:
 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);
 }

 3. Replace: pa_sink_set_max_rewind_within_thread(u-sink, u-hwbuf_size);
 with:
 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);
 }

 4. After line: if (PA_UNLIKELY((sframes =
 snd_pcm_mmap_commit(u-pcm_handle, offset, frames))  0)) { add:
 if (!after_avail  (int) sframes == -EAGAIN)
 break;

 5. Compile and install Pulseaudio with udev support

 6. Copy /etc/pulse/daemon.conf to ~/.pulse/daemon.conf and ensure it has
 uncommented: default-sample-rate = 48000

 7. Edit ~/.asoundrc and put in it:
 pcm.a52 {
@args [CARD]
@args.CARD {
type string
}
type rate
slave {
pcm {
type a52
bitrate 448
channels 6
card $CARD
}
rate 48000 #required somehow, otherwise nothing happens in
 PulseAudio
}

 8. sudo alsa reload

 9. Make sure you do not have a ~/.pulse/default.pa or if you do, that it
 is using load-module module-udev-detect to load Alsa sinks not load-module
 module-alsa-sink ...

 10. pulseaudio -k and pulseaudio -D
 }}}

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:10
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-12 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 Finally I got it all working including a52 Pulseaudio profiles!

 These are the steps on Ubuntu Lucid 10.04 LTS:
 1. Open from Pulse source code: src/modules/alsa/alsa-sink.c
 2. Replace: {{{pa_sink_set_max_rewind(u-sink, u-hwbuf_size);}}}
 with:
 {{{
 if(strcmp(u-device_name, a52) == 0) {
 pa_sink_set_max_rewind(u-sink, 0);
 } else {
 pa_sink_set_max_rewind(u-sink, u-hwbuf_size);
 }
 }}}
 3. Add Colin's patch:
 {{{
  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;
 }}}
 4. Compile and install Pulseaudio with udev support: make and sudo make
 install
 5. Edit /usr/local/share/pulseaudio/alsa-mixer/profile-sets/default.conf:
 change a52:%f to a52
 6. Copy /etc/pulse/daemon.conf to ~/.pulse/daemon.conf and ensure it has
 uncommented: default-sample-rate = 48000
 7.  Edit ~/.asoundrc
 8.  Put in it:
 {{{
 # Encode AC3 - Directly on hardware
 pcm.Filter_A52Encode {
 type a52
 bitrate 448
 channels 6
 card NVidia
 }

 # Rate Converter to 48kHz, needed for some applications
 pcm.a52 {
 type rate
 slave {
 pcm Filter_A52Encode
 rate 48000
 }
 }
 }}}
 9. Change NVidia to your card's name from: cat /proc/asound/cards
 10. sudo alsa reload
 11. Make sure you do not have a ~/.pulse/default.pa or if you do, that it
 is using load-module module-udev-detect to load Alsa sinks not load-module
 module-alsa-sink ...

 12. pulseaudio -k
 13. pulseaudio -D

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:9
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-10 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 I forced Pulseaudio not to rewind using:

 pa_sink_set_max_rewind(u-sink, 0);

 This seemed to fix it.

 timeout=0 is no longer needed in default.pa: default.pa: load-module
 module-suspend-on-idle # timeout=0

 However, there is still a need for a rate converter in asoundrc: # Rate
 Converter to 48kHz, needed for Pulseaudio it seems pcm.Filter_RateConvert
 {

 type rate slave {

 pcm Filter_A52Encode rate 48000

 }

 }

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:8
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-08 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 As the above is a different issue to the one I originally reported here, I
 have created a separate bug for it here: http://pulseaudio.org/ticket/839

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:6
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-08 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 I added to default.pa:
 load-module module-suspend-on-idle timeout=0

 and it seemed to prevent the sink unloading with Rhythmbox. SO I could
 open and close Rhythmbox and playing through SPDIF in Dolby Digital would
 work,

 However, when I load Oolite that uses libsdl then the unloading still
 seems to occur (so Oolite produces no sound).

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:7
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-07 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 I have found something that works for a while.

 I add to .asoundrc:
 {{{
 # Rate Converter to 48kHz, needed for Pulseaudio it seems
 pcm.Filter_RateConvert {
 type rate slave {
 pcm Filter_A52Encode rate 48000
 }
 }
 }}}
 and in default.pa:
 {{{
 load-module module-alsa-sink device=Filter_RateConvert rate=48000
 channels=6 tsched=0 sink_properties=device.description=SPDIF
 sink_name=SPDIF
 }}}

 Music plays through AC3 via SPDIF through Pulseaudio and Alsa, but when I
 close the application (eg. Rhythmbox music player), the SPDIF output
 disappears.

 I have attached a new back trace: pulseaudiooutput_rateconverter.txt

 I think it's here where the Filter_RateConvert sink gets unloaded for some
 reason:
 {{{
 I: client.c: Freed 1 Rhythmbox
 I: protocol-native.c: Connection died.
 I: module.c: Unloading module-alsa-sink (index: #4).
 D: module-always-sink.c: Autoloading null-sink as no other sinks detected.
 }}}

 How can I prevent this unloading?

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:5
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-03 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---

Comment(by mcarans):

 https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5054
 Alsa chap called Raymond suggests this is a Pulseaudio bug.

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:3
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2010-07-02 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart 
  Type:  defect |  Status:  reopened
 Milestone: |   Component:  daemon  
Resolution: |Keywords:  
+---
Changes (by mcarans):

  * status:  closed = reopened
  * resolution:  elsewhere =


Comment:

 Replying to [comment:1 lennart]:
  Uh. This needs to posted as a bug against the a52 alsa module upstream.
 It shouldn't return EAGAIN on snd_pcm_commit().

 Do you know if a52 alsa module been fixed and if so, which version? I am
 getting this error with Lucid. See ticket:
 http://pulseaudio.org/ticket/837

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:2
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


[pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2009-09-17 Thread PulseAudio
#655: pulseaudio crashes when using a52
---+
 Reporter:  pyropeter  |   Owner:  lennart
 Type:  defect |  Status:  new
Milestone: |   Component:  daemon 
 Keywords: |  
---+
 I use debian lenny, alsa 1.0.21, libasound2-plugins 1.0.20-1
 when I start pulseaudio I get the following error:

 {{{
 E: alsa-sink.c: Assertion 'err != -11' failed at modules/alsa/alsa-
 sink.c:395, function try_recover(). Aborting.
 }}}

 /etc/pulse/daemon.conf is empty
 /etc/pulse/default.pa:

 {{{
 .nofail
 .fail
 load-module module-device-restore
 load-module module-stream-restore
 load-module module-card-restore
 load-module module-augment-properties

 load-module module-alsa-sink sink_name=alsa_surround device=enc format=s16
 channels=4 tsched=1 rate=48000
 set-default-sink alsa_surround

 .ifexists module-bluetooth-discover.so
 load-module module-bluetooth-discover
 .endif
 .ifexists module-esound-protocol-unix.so
 load-module module-esound-protocol-unix
 .endif
 load-module module-native-protocol-unix
 .ifexists module-gconf.so
 .nofail
 load-module module-gconf
 .fail
 .endif
 load-module module-default-device-restore
 load-module module-rescue-streams
 load-module module-always-sink
 load-module module-intended-roles
 load-module module-suspend-on-idle
 load-module module-console-kit
 load-module module-position-event-sounds
 load-module module-cork-music-on-phone
 }}}

 .asoundrc:

 {{{
 pcm.ac3enc {
 type a52
 rate 48000
 channels 4
 }

 pcm.enc {
 type plug
 slave {
 pcm ac3enc
 }
 }

 ctl.enc {
 type hw
 card 0
 }
 }}}

 backtrace is appended

-- 
Ticket URL: http://pulseaudio.org/ticket/655
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets


Re: [pulseaudio-tickets] [PulseAudio] #655: pulseaudio crashes when using a52

2009-09-17 Thread PulseAudio
#655: pulseaudio crashes when using a52
+---
  Reporter:  pyropeter  |   Owner:  lennart
  Type:  defect |  Status:  closed 
 Milestone: |   Component:  daemon 
Resolution:  elsewhere  |Keywords: 
+---
Changes (by lennart):

  * status:  new = closed
  * resolution:  = elsewhere


Comment:

 Uh. This needs to posted as a bug against the a52 alsa module upstream. It
 shouldn't return EAGAIN on snd_pcm_commit().

-- 
Ticket URL: http://pulseaudio.org/ticket/655#comment:1
PulseAudio http://pulseaudio.org/
The PulseAudio Sound Server
___
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets