Merge ~robertliu/snappy-hwe-snaps/+git/pulseaudio:master into ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master

Proposed by Robert Liu
Status: Merged
Approved by: Jim Hodapp
Approved revision: e697cdd85a8e8d12e590fa10dcef9d6d3177a776
Merged at revision: 5ba21e4d3ce2d3fed46a73fcf9f69abacb682104
Proposed branch: ~robertliu/snappy-hwe-snaps/+git/pulseaudio:master
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master
Diff against target: 102 lines (+54/-7)
2 files modified
bin/pulseaudio (+4/-1)
snapcraft.yaml (+50/-6)
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
System Enablement Bot continuous-integration Needs Fixing
Simon Fels Approve
Review via email: mp+311561@code.launchpad.net

This proposal supersedes a proposal from 2016-11-23.

Description of the change

When using the original pulseaudio snap on Intel NUC, pulseaudio only listed the analog output but not HDMI audio port. After some debugging, I found libasound2 has several hard-coded path variables. These modifications are used to change the paths in libasound2-data.

1. Import alsa-lib_1.1.0-0ubuntu1 source code to a new branch, https://git.launchpad.net/~robertliu/snappy-hwe-snaps/+git/pulseaudio
2. Modify alsa-lib to use the SNAP environment variable when getting the data directory
3. Add a new parts in snapcraft.yaml for alsa-lib
4. Only pack necessary files in the snap

Also export more variables in bin/pulseaudio.

To post a comment you must log in.
Revision history for this message
Simon Fels (morphis) wrote : Posted in a previous version of this proposal

This needs rebase or merge now that https://code.launchpad.net/~jhodapp/snappy-hwe-snaps/+git/fix-pulseaudio-slots-plugs/+merge/309604 is merged. Leaving detailed review up to Jim.

Revision history for this message
Jim Hodapp (jhodapp) wrote : Posted in a previous version of this proposal

Thanks for the changes. Please see my comments inline below.

review: Needs Fixing (code)
Revision history for this message
Robert Liu (robertliu) wrote : Posted in a previous version of this proposal

Jim, thank you for the comments.
I'll create a downstream branch then update the commits.

Revision history for this message
Jim Hodapp (jhodapp) wrote : Posted in a previous version of this proposal

Not a problem, sounds good.

Revision history for this message
Simon Fels (morphis) wrote :

One comment inline but otherwise looks really good already. Thanks for this and sorry that this takes so long.

review: Needs Fixing
Revision history for this message
Simon Fels (morphis) wrote :

LGTM, but wondering why the CI doesn't pick this up. Need CI approval before we can merge this one. Will have a quick look.

review: Approve
Revision history for this message
Simon Fels (morphis) wrote :

I remember why. We don't allow CI for users not part of the snappy-hwe-team. Triggered a manual run of the CI now at https://jenkins.canonical.com/system-enablement/job/generic-build-snap/380/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/pulseaudio b/bin/pulseaudio
2index ff69475..d9fb85f 100755
3--- a/bin/pulseaudio
4+++ b/bin/pulseaudio
5@@ -5,14 +5,17 @@ set -x
6 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
7 export PULSE_STATE_PATH=$SNAP_DATA/state
8 export ALSA_CONFIG_UCM=$SNAP/usr/share/alsa/ucm
9+export ALSA_CONFIG_TPLG=$SNAP/usr/share/alsa/topology
10 export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf
11+export ALSA_MIXER_SIMPLE=$SNAP/usr/share/alsa/smixer.conf
12
13 mkdir -p $PULSE_STATE_PATH
14
15 EXTRA_ARGS=
16
17 if [ -e $SNAP_DATA/config/debug ] ; then
18- EXTRA_ARGS="$EXTRA_ARGS -vvv"
19+ EXTRA_ARGS="$EXTRA_ARGS -vvvv"
20+ export LIBASOUND_DEBUG=1
21 fi
22
23 $SNAP/usr/bin/pulseaudio \
24diff --git a/snapcraft.yaml b/snapcraft.yaml
25index 1abb760..abb0b5f 100644
26--- a/snapcraft.yaml
27+++ b/snapcraft.yaml
28@@ -47,7 +47,38 @@ parts:
29 bin/config: bin/config
30 data/copyright: usr/share/doc/pulseaudio/copyright
31
32+ alsa-lib:
33+ plugin: autotools
34+
35+ source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
36+ source-type: git
37+ source-branch: alsa-lib/xenial/1.1.0
38+
39+ configflags:
40+ - --prefix=/usr
41+ - --sysconfdir=/etc
42+ - --libexec=/usr/lib
43+ - --libdir=/usr/lib
44+ - --localstatedir=/var
45+ - --with-plugindir=/usr/lib/alsa-lib
46+ - --disable-silent-rules
47+ - --disable-static
48+ - --disable-python
49+
50+ filesets:
51+ libasound2:
52+ - usr/lib/libasound.so*
53+ - usr/lib/alsa-lib/*
54+ - usr/share/alsa/*
55+
56+ snap:
57+ - $libasound2
58+
59+
60 pulseaudio:
61+ after:
62+ - alsa-lib
63+
64 plugin: autotools
65
66 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
67@@ -72,12 +103,6 @@ parts:
68 - libasyncns-dev
69 - libxcb1-dev
70
71- stage-packages:
72- # Needed for various ALSA related configuration files the alsa
73- # module inside PulseAudio requires to use any available audio
74- # device properly
75- - libasound2-data
76-
77 configflags:
78 - --prefix=/usr
79 - --sysconfdir=/etc
80@@ -104,3 +129,22 @@ parts:
81 - --disable-x11
82 - --with-system-user=root
83 - --with-system-group=root
84+
85+ filesets:
86+ pauseaudiofiles:
87+ - etc/*
88+ - lib/*
89+ - usr/bin/pacat
90+ - usr/bin/pactl
91+ - usr/bin/paplay
92+ - usr/bin/parec
93+ - usr/bin/pulseaudio
94+ - usr/lib/libpulse-mainloop-glib.so*
95+ - usr/lib/libpulse-simple.so*
96+ - usr/lib/libpulse.so*
97+ - usr/lib/pulse-8.0/*
98+ - usr/lib/pulseaudio/*.so
99+ - usr/share/pulseaudio/*
100+
101+ snap:
102+ - $pauseaudiofiles

Subscribers

People subscribed via source and target branches

to all changes: