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
diff --git a/bin/pulseaudio b/bin/pulseaudio
index ff69475..d9fb85f 100755
--- a/bin/pulseaudio
+++ b/bin/pulseaudio
@@ -5,14 +5,17 @@ set -x
5export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/5export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
6export PULSE_STATE_PATH=$SNAP_DATA/state6export PULSE_STATE_PATH=$SNAP_DATA/state
7export ALSA_CONFIG_UCM=$SNAP/usr/share/alsa/ucm7export ALSA_CONFIG_UCM=$SNAP/usr/share/alsa/ucm
8export ALSA_CONFIG_TPLG=$SNAP/usr/share/alsa/topology
8export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf9export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf
10export ALSA_MIXER_SIMPLE=$SNAP/usr/share/alsa/smixer.conf
911
10mkdir -p $PULSE_STATE_PATH12mkdir -p $PULSE_STATE_PATH
1113
12EXTRA_ARGS=14EXTRA_ARGS=
1315
14if [ -e $SNAP_DATA/config/debug ] ; then16if [ -e $SNAP_DATA/config/debug ] ; then
15 EXTRA_ARGS="$EXTRA_ARGS -vvv"17 EXTRA_ARGS="$EXTRA_ARGS -vvvv"
18 export LIBASOUND_DEBUG=1
16fi19fi
1720
18$SNAP/usr/bin/pulseaudio \21$SNAP/usr/bin/pulseaudio \
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 1abb760..abb0b5f 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -47,7 +47,38 @@ parts:
47 bin/config: bin/config47 bin/config: bin/config
48 data/copyright: usr/share/doc/pulseaudio/copyright48 data/copyright: usr/share/doc/pulseaudio/copyright
4949
50 alsa-lib:
51 plugin: autotools
52
53 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
54 source-type: git
55 source-branch: alsa-lib/xenial/1.1.0
56
57 configflags:
58 - --prefix=/usr
59 - --sysconfdir=/etc
60 - --libexec=/usr/lib
61 - --libdir=/usr/lib
62 - --localstatedir=/var
63 - --with-plugindir=/usr/lib/alsa-lib
64 - --disable-silent-rules
65 - --disable-static
66 - --disable-python
67
68 filesets:
69 libasound2:
70 - usr/lib/libasound.so*
71 - usr/lib/alsa-lib/*
72 - usr/share/alsa/*
73
74 snap:
75 - $libasound2
76
77
50 pulseaudio:78 pulseaudio:
79 after:
80 - alsa-lib
81
51 plugin: autotools82 plugin: autotools
5283
53 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio84 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
@@ -72,12 +103,6 @@ parts:
72 - libasyncns-dev103 - libasyncns-dev
73 - libxcb1-dev104 - libxcb1-dev
74105
75 stage-packages:
76 # Needed for various ALSA related configuration files the alsa
77 # module inside PulseAudio requires to use any available audio
78 # device properly
79 - libasound2-data
80
81 configflags:106 configflags:
82 - --prefix=/usr107 - --prefix=/usr
83 - --sysconfdir=/etc108 - --sysconfdir=/etc
@@ -104,3 +129,22 @@ parts:
104 - --disable-x11129 - --disable-x11
105 - --with-system-user=root130 - --with-system-user=root
106 - --with-system-group=root131 - --with-system-group=root
132
133 filesets:
134 pauseaudiofiles:
135 - etc/*
136 - lib/*
137 - usr/bin/pacat
138 - usr/bin/pactl
139 - usr/bin/paplay
140 - usr/bin/parec
141 - usr/bin/pulseaudio
142 - usr/lib/libpulse-mainloop-glib.so*
143 - usr/lib/libpulse-simple.so*
144 - usr/lib/libpulse.so*
145 - usr/lib/pulse-8.0/*
146 - usr/lib/pulseaudio/*.so
147 - usr/share/pulseaudio/*
148
149 snap:
150 - $pauseaudiofiles

Subscribers

People subscribed via source and target branches

to all changes: