You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Add document to clarify BKM of user space packages: alsa-lib, alsa-ucm-conf, PulseAudio, GNOME etc #2211
Add document to clarify Best Known Method of user space packages: alsa-lib, alsa-ucm-conf, PulseAudio, GNOME etc.
Based on the document, we'll maintain ‘BKM packages’ based on documented upstream tag + fixes being upstreamed for each program.
The BKM packages would be provided externally as Debian packages as well as source code with a branch for non-Debian distros. This will require the use of clones in thesofproject (as done for alsa-lib already).
A Debian source package is traditionally made of an upstream.orig.tar.bz2 + debian/patches/*.patch files and other debian/* control files packages in a second, downstream "debian diff" tarball. Lucky us, for alsa-lib (and others?) Debian provides something much better than tarballs: git!
While downloading the above, apt-get source alsa-lib prints this awesome advice:
Reading package lists... Done
NOTICE: 'alsa-lib' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/alsa-team/alsa-lib.git
Please use:
git clone https://salsa.debian.org/alsa-team/alsa-lib.git
to retrieve the latest (possibly unreleased) updates to the package.
Get:1 http:// /pub/mirrors/ubuntu focal-updates/main alsa-lib 1.2.2-2.1ubuntu1 (dsc) [2,007 B]
Get:2 http:// /pub/mirrors/ubuntu focal-updates/main alsa-lib 1.2.2-2.1ubuntu1 (tar) [1,031 kB]
Get:3 http:// /pub/mirrors/ubuntu focal-updates/main alsa-lib 1.2.2-2.1ubuntu1 (diff) [30.4 kB]
So let's follow this advice: delete the above and start over:
mkdir DebianBuild && cd DebianBuild # debuild creates .deb files in the parent directory
git clone https://salsa.debian.org/alsa-team/alsa-lib.git
Optional: git merge or git cherry-pick. For instance let's fix the super annoying thesofproject/sof#2543 ASRC1.0 regression that breaks sof/scripts/build-tools.sh -t
This will typically fails the first time because of some missing dependencies. apt-get install them, rinse repeat:
time debuild -b -us -uc -i -I
dpkg-deb: building package 'libasound2' in '../libasound2_1.2.2-2.1_amd64.deb'.
dpkg-deb: building package 'libasound2-dev' in '../libasound2-dev_1.2.2-2.1_amd64.deb'.
dpkg-deb: building package 'libasound2-data' in '../libasound2-data_1.2.2-2.1_all.deb'.
dpkg-deb: building package 'libasound2-doc' in '../libasound2-doc_1.2.2-2.1_all.deb'.
dpkg-deb: building package 'libasound2-plugin-smixer' in '../libasound2-plugin-smixer_1.2.2-2.1_amd64.deb'.
dpkg-deb: building package 'libatopology2' in '../libatopology2_1.2.2-2.1_amd64.deb'.
TODO: figure out a safer and less scary "clean" command than git reset --hard && git clean -fdx. make distclean goes a long way but falls a bit short.
UPDATE: ./debian/rules clean seems good enough.
Sorry I meant: git clone https://github.com/marc-hb/alsa-lib.git -b v1.2.3.1+debian
Doesn't work for me with 1.2.3.2 (actually commit 32addac948a61c4770f9cdf459fa29879602df38)
That's a plain, upstream ALSA commit with nothing I did. It doesn't even have any debian/ subdirectory:
time debuild -b -us -uc -i -I
debuild: fatal error at line 679:
cannot find readable debian/changelog anywhere!
Are you in the source code tree?
You seem to have some stale debian/ subdirectory from some past experiment? Run the clone git command above from scratch in a fresh, brand new subdirectory.
To be clear, the goal is to use early versions or SHA1s, not necessarily released versions of alsa-lib.
I just git merged my v1.2.3.1+debian branch with the very latest v1.2.3.2-4-g877bdf95fdfd and everything built fine.
@marc-hb i didn't use your branch because I couldn't figure out why you used an older version - I tried with the instructions above with git fetch/merge and that's how I got the merge issue.
I appreciate the help but I don't want to use something that someone else created with some magic - a script is all I need/want.
@marc-hb i didn't use your branch because I couldn't figure out why you used an older version
I used the tag listed by @libinyang in the requirements in the second comment. As tested above you can merge any later version and it will Just Work. I'll push the result soon.
I tried with the instructions above with git fetch/merge and that's how I got the merge issue.
The git command failed (and you didn't notice) because I had [email protected]:marc-hb/alsa-lib as a remote which works only for me. Fixed, try again and it will Just Work.
I appreciate the help but I don't want to use something that someone else created with some magic - a script is all I need/want.
Try the two commands above. Repeating them here:
git clone https://github.com/marc-hb/alsa-lib.git -b v1.2.3.1+debian
cd alsa-lib
time debuild -b -us -uc -i -I
The "magic" is merely combining debian packaging with upstream ALSA and fixing two minor issues. The only alternative is re-implementing debian packaging from scratch which is already available in a git repo - why would anyone do that?
@libinyang The ask was to have userspace packages that are to be used by all SOF developers and all CI/QA devices, not just the developers dealing with userspace. We want people to use the latest solution with all the fixes, so that we don't have reports of 'this doesn't work' when it's already fixed upstream. We also want these packages to be publicly available, not just limited to Intel.
@plbossart There are 2 versions of the packages on the storage server. One is fully tested and it is for the customers. In this thread I think we are talking about this kind package. Another kind package is always using the latest code and will contain all the fixes. This is not fully tested but it will be tested in our CI. I think this package can meet your requirement.
For the public availability, do you mean we should put the packages in the github or somewhere else, not in the storage server?
any target distro is a moving target, there's e.g. a new Ubuntu every six months.. we need to provide packages for each separately (just like distros are)
even with ALSA packages, it's not guaranteed upstream version will work without issues on a distro -- most distos have a non-trivial amount of additional patches and if we just take upstream version, we are testing an untested combination of the system and might new bugs (and anyone using our packages)
for e.g. Ubuntu, we'd need to distribute the binaries and sources as a PPA so you could just "apt-get upgrade" to get the SOF updated packages -- downloading individual packages won't scale and is very error prone
I don't have a silver bullet to solve this, but I think it would be ok to start up smaller, and maybe just provide alsa-ucm and alsa-lib at first, and try to scale that while meeting above criteria. When/if this works, then scale up higher to stack.
@libinyang can you work on this, with the use of topology 2.0 we'll need newer packages and we'll need all SOF developers to know what to install. This is a priority IMHO.
@plbossart The packages are ready in both storage server (based on the latest code) and in ubuntu launchpad (a stable version we have fully tested on our devices), and the documents are created in wiki. The dedicated wiki tells developers how to install the packages. Besides this, if we are using the deploy scripts in sof-sh, we can install the latest alsa-lib, alsa-ucm packages. And for the distros newer than 20.04, pulseaudio and GNOME is workable for us now.
If we want to build the topology 2.0, we can use sof-sh to setup the alsa-lib environment or download latest alsa-lib for storage server and manually install the alsa-lib packages.
@aiChaoSONG Do we need to update alsa-utils to build the topology 2.0?
If we want to build the topology 2.0, we can use sof-sh to setup the alsa-lib environment or download latest alsa-lib for storage server and manually install the alsa-lib packages.
@aiChaoSONG Do we need to update alsa-utils to build the topology 2.0?
I think the full ask of this ticket is a fairly large one.
Agreed but we can start with only one version for now = only one recent and regularly updated ALSA version + same for pulseaudio and tested only on the latest Ubuntu version.
The very first documentation step is to correct this documentation so it points at our branches and then make sure the instructions still apply. They should be no longer than a couple lines: just run the same script(s) @libinyang has been using (once they're reviewed and published)
@plbossart@mengdonglin Our latest user space packages are stored on the internal storage server. So it seems I can't submit the doc of user space guide to sof-docs, otherwise it will expose our internal server location. Maybe we can create a new repo on thesofproject, which is dedicated for user space packages? What's your opinion?
Activity
libinyang commentedon Jun 19, 2020
@mengdonglin You mean we will add document in https://github.com/thesofproject/sof-docs, right?
libinyang commentedon Jun 22, 2020
State summary of user space which we may need to upgrade:
plbossart commentedon Jun 22, 2020
@libinyang sounds good but can we start adding tags/versions for each, as well as the list of PRs needed on top?
libinyang commentedon Jun 23, 2020
@plbossart Yes, I will add the tags and PRs for them.
libinyang commentedon Jun 24, 2020
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/283
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/295 (not finalized)
plbossart commentedon Jun 24, 2020
what tag?
this is merged already?
what about https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/10
marc-hb commentedon Jul 3, 2020
A Debian source package is traditionally made of an
upstream.orig.tar.bz2+debian/patches/*.patchfiles and otherdebian/*control files packages in a second, downstream "debian diff" tarball. Lucky us, foralsa-lib(and others?) Debian provides something much better than tarballs: git!While downloading the above,
apt-get source alsa-libprints this awesome advice:So let's follow this advice: delete the above and start over:
Optional:
git mergeorgit cherry-pick. For instance let's fix the super annoying thesofproject/sof#2543 ASRC1.0 regression that breakssof/scripts/build-tools.sh -tAfter testing this branch can now be shared somewhere like https://github.com/thesofproject/alsa-lib/ubuntu20
One-command build:
This will typically fails the first time because of some missing dependencies.
apt-get installthem, rinse repeat:Install the ../*.deb just created
More info at https://help.ubuntu.com/community/UpdatingADeb
https://salsa.debian.org/alsa-team/ has alsa-utils too, I'll prepare a branch for alsa-utils too if there's explicit approval for the above approach.
TODO: figure out a safer and less scary "clean" command than
git reset --hard && git clean -fdx.make distcleangoes a long way but falls a bit short.UPDATE:
./debian/rules cleanseems good enough.marc-hb commentedon Jul 3, 2020
I merged this with the debian branch, fixed two minor issues and shared it there:
These three lines are now enough for me to build .deb files for v1.2.3.1, let me know if any issue.
plbossart commentedon Jul 6, 2020
Doesn't work for me with 1.2.3.2 (actually commit 32addac948a61c4770f9cdf459fa29879602df38)
Conflicts left and right and errors on compilation.
To be clear, the goal is to use early versions or SHA1s, not necessarily released versions of alsa-lib.
marc-hb commentedon Jul 6, 2020
Sorry I meant:
git clone https://github.com/marc-hb/alsa-lib.git -b v1.2.3.1+debianThat's a plain, upstream ALSA commit with nothing I did. It doesn't even have any
debian/subdirectory:You seem to have some stale
debian/subdirectory from some past experiment? Run the clone git command above from scratch in a fresh, brand new subdirectory.I just git merged my
v1.2.3.1+debianbranch with the very latestv1.2.3.2-4-g877bdf95fdfdand everything built fine.plbossart commentedon Jul 6, 2020
@marc-hb i didn't use your branch because I couldn't figure out why you used an older version - I tried with the instructions above with git fetch/merge and that's how I got the merge issue.
I appreciate the help but I don't want to use something that someone else created with some magic - a script is all I need/want.
marc-hb commentedon Jul 6, 2020
I used the tag listed by @libinyang in the requirements in the second comment. As tested above you can merge any later version and it will Just Work. I'll push the result soon.
The git command failed (and you didn't notice) because I had
[email protected]:marc-hb/alsa-libas a remote which works only for me. Fixed, try again and it will Just Work.Try the two commands above. Repeating them here:
The "magic" is merely combining debian packaging with upstream ALSA and fixing two minor issues. The only alternative is re-implementing debian packaging from scratch which is already available in a git repo - why would anyone do that?
19 remaining items
marc-hb commentedon Oct 13, 2020
We also want the source and recipes of these packages to be publicly available
I shared above a few months ago a proof of concept that checked all these boxes and I wonder what happened until now.
libinyang commentedon Oct 22, 2020
@plbossart There are 2 versions of the packages on the storage server. One is fully tested and it is for the customers. In this thread I think we are talking about this kind package. Another kind package is always using the latest code and will contain all the fixes. This is not fully tested but it will be tested in our CI. I think this package can meet your requirement.
For the public availability, do you mean we should put the packages in the github or somewhere else, not in the storage server?
kv2019i commentedon Oct 23, 2020
Sorry for the late feedback to this topic. I think the full ask of this ticket is a fairly large one. Complicating factors:
I don't have a silver bullet to solve this, but I think it would be ok to start up smaller, and maybe just provide alsa-ucm and alsa-lib at first, and try to scale that while meeting above criteria. When/if this works, then scale up higher to stack.
plbossart commentedon Jun 10, 2021
@libinyang can you work on this, with the use of topology 2.0 we'll need newer packages and we'll need all SOF developers to know what to install. This is a priority IMHO.
libinyang commentedon Jun 15, 2021
@plbossart The packages are ready in both storage server (based on the latest code) and in ubuntu launchpad (a stable version we have fully tested on our devices), and the documents are created in wiki. The dedicated wiki tells developers how to install the packages. Besides this, if we are using the deploy scripts in sof-sh, we can install the latest alsa-lib, alsa-ucm packages. And for the distros newer than 20.04, pulseaudio and GNOME is workable for us now.
If we want to build the topology 2.0, we can use sof-sh to setup the alsa-lib environment or download latest alsa-lib for storage server and manually install the alsa-lib packages.
@aiChaoSONG Do we need to update alsa-utils to build the topology 2.0?
plbossart commentedon Jun 15, 2021
what wiki @libinyang ? We need publicly available information.
mengdonglin commentedon Jun 15, 2021
@libinyang topology 2.0 is still under active development, so I suggest we update the document for topology 2.0 later. For other components, I think you can submit document PR to https://github.com/thesofproject/sof-docs . After your PRs get merged, it will be public and visible in https://thesofproject.github.io/latest/index.html
marc-hb commentedon Jun 15, 2021
Agreed but we can start with only one version for now = only one recent and regularly updated ALSA version + same for pulseaudio and tested only on the latest Ubuntu version.
Note we already have documentation about building user space ALSA from source: https://thesofproject.github.io/latest/getting_started/build-guide/build-from-scratch.html#build-alsa-lib-and-alsa-utils
The very first documentation step is to correct this documentation so it points at our branches and then make sure the instructions still apply. They should be no longer than a couple lines: just run the same script(s) @libinyang has been using (once they're reviewed and published)
Then documentation about using binary releases should probably go to https://thesofproject.github.io/latest/release.html
Regularly but not immediately and not automatically. There is a review and publication process performed by our doc writer.
On the other hand, Github knows how to render .rst file so it's possible to have an immediate preview at https://github.com/thesofproject/sof-docs/blob/master/getting_started/build-guide/build-from-scratch.rst
aiChaoSONG commentedon Jun 16, 2021
@libinyang We need alsa-lib update now, because alsa-project/alsa-lib#158 is needed.
plbossart commentedon Jun 16, 2021
and we also want to remove references to master/slave in topologies, which IIRC requires alsa-lib 1.2.5 or later.
libinyang commentedon Jun 18, 2021
@plbossart As per @mengdonglin 's suggestion, I will submit a PR in https://github.com/thesofproject/sof-docs, which is public. And I will update the alsa-lib to 1.2.5 or later.
@marc-hb In this document, we will tell user how to get the pakcages, not how to build the packages.
libinyang commentedon Jun 24, 2021
@plbossart @mengdonglin Our latest user space packages are stored on the internal storage server. So it seems I can't submit the doc of user space guide to sof-docs, otherwise it will expose our internal server location. Maybe we can create a new repo on thesofproject, which is dedicated for user space packages? What's your opinion?
plbossart commentedon Jul 25, 2022
this ask never went anywhere. closing.
marc-hb commentedon May 5, 2025