[lxc-users] lxc guest cannot play sound using pulseaudio. tcp module is loaded with permission.

Fajar A. Nugraha list at fajar.net
Mon May 25 06:53:32 UTC 2015


On Mon, May 25, 2015 at 1:40 PM, Oz Dror <odror7 at gmail.com> wrote:
>> Does "pactl list  modules" on the host show the module loaded and
>> correctly configured? An example output on my host setup
>> $ pactl info
>> Server String: unix:/run/user/1000/pulse/native
>> ...
>> Is Local: yes
>
>
> pactl info (in server same as on client)
> Server String: 192.168.x.x
> Library Protocol Version: 30
> S Server Protocol Version: 30
> Is Local: no   <---------------------------------   Is this a problem???

Is this on the host, the one with sound card?

I'm not sure what makes it that way, perhaps you set PULSE_SERVER on
the host as well? You shouldn't need that on ubuntu to play sound
locally.

> but when I type pacmd list-sinks on the guest I get only the dummy card
> I do not get the long list of cards that I get on the host.

You don't have to. The command doesn't even run on my container, yet
container sound works fine. "pactl list sinks", however, works
correctly, and shows the same sinks as on the host (I'm using
bluetooth headset).

# pacmd list-sinks
No PulseAudio daemon running, or not running as session daemon.

# pactl list sinks
xcb_connection_has_error() returned true
...
Sink #1
State: RUNNING
Name: bluez_sink.00_11_67_89_AD_63.a2dp
Description: BH-01
Driver: module-bluez4-device.c

# paplay -v /usr/share/sounds/alsa/Front_Center.wav
Opening a playback stream with sample specification 's16le 1ch
48000Hz' and channel map 'mono'.
xcb_connection_has_error() returned true
Connection established.
Stream successfully created.
Buffer metrics: maxlength=4194304, tlength=192000, prebuf=190082, minreq=1920
Using sample spec 's16le 1ch 48000Hz', channel map 'mono'.
Connected to device bluez_sink.00_11_67_89_AD_63.a2dp (1, not suspended).
Stream started.
Playback stream drained.: 72125 usec.
Draining connection to server.

-- 
Fajar


More information about the lxc-users mailing list