Ticket #575 (closed enhancement: worksforme)

Opened 3 years ago

Last modified 3 years ago

PA doesn't work in r/o $HOME.

Reported by: knightk Owned by: lennart
Milestone: 0.9.16 Component: daemon
Keywords: Cc:

Description

In order for me to use paplay I need module-native-protocol-unix loaded into my pulseaudio server. When I do this I get Failed to open cookie file '//.pulse-cookie' : Read-only file system.

My embedded target rootfs is read only.

Is there anyway to get around this?

I'm using pulseaudio-0.9.10 with alsa-1.0.20

Thanks

Change History

Changed 3 years ago by knightk

  • summary changed from Failed to open cookie file '//.pulse-cookie' : Read-only file system to using pacat to stream to USB headphones not working

My solution to this was to direct the cookie to the /tmp mounted ram on my target 1) in rootfs I set up a link ln -s /tmp/.pulse-cookie .pulse-cookie (this fixed the issue with loading module-native-protocol-unix required by the server to communicate with the clients) 2) in client.conf I set cookie-file = /tmp/.pulse-cookie

Now I'm able to use paplay and pacat on my ARMv6 target

Can any one help me with the following?

I'm attempting to stream a microphone to both an analog headphone and a usb headphone. Only the analog headphone works when I stream.

Interestingly, both usb and analog work fine if I just paplay a file!

Here is my setup for the streaming which only works for the analog headphones.

#pulseaudio -nC -v --log-level=debug --log-target=syslog

load-module module-alsa-sink device=hw:1 sink_name=outputUSB load-module module-alsa-sink device=hw:0 sink_name=outputjack load-module module-combine sink_name=combined master=outputUSB slaves=outputjack set-default-sink combined load-module module-alsa-source device=hw:0 source_name=inputHDAV set-default-source inputHDAV load-module module-native-protocol-unix

from another terminal I run #pacat -r --fix-format | paplay

Audio in analog headphones but not in USB headphones!!!!!!

Thanks

Changed 3 years ago by lennart

  • type changed from defect to enhancement
  • summary changed from using pacat to stream to USB headphones not working to PA doesn't work in r/o $HOME.

Hmm, there's something wrong with your system. $HOME should probably not point to / which seems to be the case for you.

The PA code currently assume that $HOME is writable. Happy to take patches that would add compatibility with r/o $HOME.

Please create seperate bug reports for all issues you have.

Changed 3 years ago by knightk

I'll work on a patch for compatibility for r/o $HOME.

PACAT's stream_read_callback() not called


I have successfully used arecord to capture audio on my ARMv6 target so I know my hardware is good. When I attempt to use pacat -r -v I do not see any calls to stream_read_callback(pa_stream *s, size_t length, void *userdata)! Connection is established and the stream successfully created, also the time_event_callback is called repeatedly.

On my laptop I don't even need a module-alsa-source loaded to get stream_read_callback() to get called repeatedly. It is sufficient for me to launch pulseaudio, load modules module-native-protocol-unix and module-alsa-sink (would'nt work without the sink!).. then pacat -r -v

paplay "Failed to open file STDIN"


The other issue is that when attempting to pipe anything to paplay on my target I get a 'Failed to open file STDIN'. Why paplay can't accept chars from another app is another puzzle. E.g. madplay -o wave:- file.mp3 | paplay produces a STDIN issue. madplay -o wave:- file.mp3 fills the screen with lots of chars... so I know madplay is OK.

Any hints would be very welcome. Thanks

Changed 3 years ago by lennart

Dude, as I mentioned, please create seperate bug reports for seperate issues, thanks! Otherwise it is very hard for me to follow the different issues you have.

paplay in PA git should handle stdin properly.

Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to worksforme
  • milestone set to 0.9.16

I just checked and PA worked fine for me with a read-only $HOME. Of course, .pulse and .pulse-cookie needs to be existing for that to work. Which I think is OK behaviour.

Closing hence.

Note: See TracTickets for help on using tickets.