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

Proposed by Robert Liu
Status: Superseded
Proposed branch: ~robertliu/snappy-hwe-snaps/+git/pulseaudio:master
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master
Diff against target: 109 lines (+55/-8)
2 files modified
bin/pulseaudio (+4/-1)
snapcraft.yaml (+51/-7)
Reviewer Review Type Date Requested Status
Snappy HWE Team Pending
Jim Hodapp code Pending
Review via email: mp+311559@code.launchpad.net

This proposal supersedes a proposal from 2016-10-28.

This proposal has been superseded by 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 debug, 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
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.

Unmerged commits

f551803... by Robert Liu

Using local libasound2 and libasound2-data

4ff410e... by Robert Liu

* rebase to jhodapp

50f0ad8... by Robert Liu

* modify script name in Makefile

baf496b... by Robert Liu

* move libasound2-data patch related files to a sub directory

5300c7b... by Robert Liu

* add more ALSA config environments and rewrite the pathes in libasound2-data

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 a7dd7e5..6dd2d38 100644
26--- a/snapcraft.yaml
27+++ b/snapcraft.yaml
28@@ -1,5 +1,5 @@
29 name: pulseaudio
30-version: 8.0-1
31+version: 8.0-2
32 summary: PulseAudio sound server
33 description: |
34 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
35@@ -47,7 +47,38 @@ parts:
36 bin/config: bin/config
37 data/copyright: usr/share/doc/pulseaudio/copyright
38
39+ alsa-lib:
40+ plugin: autotools
41+
42+ source: https://git.launchpad.net/~robertliu/snappy-hwe-snaps/+git/pulseaudio
43+ source-type: git
44+ source-branch: alsa-lib/1.1.0
45+
46+ configflags:
47+ - --prefix=/usr
48+ - --sysconfdir=/etc
49+ - --libexec=/usr/lib
50+ - --libdir=/usr/lib
51+ - --localstatedir=/var
52+ - --with-plugindir=/usr/lib/alsa-lib
53+ - --disable-silent-rules
54+ - --disable-static
55+ - --disable-python
56+
57+ filesets:
58+ libasound2:
59+ - usr/lib/libasound.so*
60+ - usr/lib/alsa-lib/*
61+ - usr/share/alsa/*
62+
63+ snap:
64+ - $libasound2
65+
66+
67 pulseaudio:
68+ after:
69+ - alsa-lib
70+
71 plugin: autotools
72
73 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
74@@ -72,12 +103,6 @@ parts:
75 - libasyncns-dev
76 - libxcb1-dev
77
78- stage-packages:
79- # Needed for various ALSA related configuration files the alsa
80- # module inside PulseAudio requires to use any available audio
81- # device properly
82- - libasound2-data
83-
84 configflags:
85 - --prefix=/usr
86 - --sysconfdir=/etc
87@@ -104,3 +129,22 @@ parts:
88 - --disable-x11
89 - --with-system-user=root
90 - --with-system-group=root
91+
92+ filesets:
93+ pauseaudiofiles:
94+ - etc/*
95+ - lib/*
96+ - usr/bin/pacat
97+ - usr/bin/pactl
98+ - usr/bin/paplay
99+ - usr/bin/parec
100+ - usr/bin/pulseaudio
101+ - usr/lib/libpulse-mainloop-glib.so*
102+ - usr/lib/libpulse-simple.so*
103+ - usr/lib/libpulse.so*
104+ - usr/lib/pulse-8.0/*
105+ - usr/lib/pulseaudio/*.so
106+ - usr/share/pulseaudio/*
107+
108+ snap:
109+ - $pauseaudiofiles

Subscribers

People subscribed via source and target branches

to all changes: