<div dir="ltr">In LuneOS we have .bbappend in distro layer adding the UCM files for MACHINEs we support.<div><br></div><div>It&#39;s not nice, but before this recipe we were adding the same in alsa-lib bbappend, so it&#39;s not worse than before for sure.</div><div><br></div><div>BSP layer with .bbappend is a bit worse, because including BSP layer shouldn&#39;t change anything for other MACHINEs. For UCM it&#39;s on edge, because if the files are added correctly, then there won&#39;t be any change in behavior for other MACHINEs in practise, but still people won&#39;t be happy from even alsa-ucm-conf being rebuilt just by adding BSP layer to bblayers.conf. (In theory distro layers shouldn&#39;t influence anything when their supported DISTRO isn&#39;t selected as well, but this rule is much less enforced, because often it doesn&#39;t make much sense to include the distro layer without using that DISTRO - unlike BSP where multiple BSP layers will be included just to sequentially build the images for various MACHINEs in the same build directory).</div><div><br></div><div>Maybe nobody replied, because there isn&#39;t really good way how to handle this :/.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 1, 2020 at 9:21 AM Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi">tanuk@iki.fi</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2020-01-30 at 15:01 +0100, Nicolas Dechesne wrote:<br>
&gt; hey,<br>
&gt; <br>
&gt; On Mon, Jan 6, 2020 at 10:18 AM Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt; wrote:<br>
&gt; &gt; The UCM configuration files were moved from the alsa-lib repository to a<br>
&gt; &gt; new alsa-ucm-conf repository. The move was accompanied by a license<br>
&gt; &gt; change from LGPL2.1 to BSD-3-Clause.<br>
&gt; &gt; <br>
&gt; &gt; Signed-off-by: Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;  meta/conf/distro/include/maintainers.inc      |  1 +<br>
&gt; &gt;  .../alsa/<a href="http://alsa-lib_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-lib_1.2.1.2.bb</a>                  |  2 +-<br>
&gt; &gt;  .../alsa/<a href="http://alsa-ucm-conf_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-ucm-conf_1.2.1.2.bb</a>             | 23 +++++++++++++++++++<br>
&gt; &gt;  3 files changed, 25 insertions(+), 1 deletion(-)<br>
&gt; &gt;  create mode 100644 meta/recipes-multimedia/alsa/<a href="http://alsa-ucm-conf_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-ucm-conf_1.2.1.2.bb</a><br>
&gt; &gt; <br>
&gt; &gt; diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc<br>
&gt; &gt; index 39eee9475c..c9fb373f52 100644<br>
&gt; &gt; --- a/meta/conf/distro/include/maintainers.inc<br>
&gt; &gt; +++ b/meta/conf/distro/include/maintainers.inc<br>
&gt; &gt; @@ -35,6 +35,7 @@ RECIPE_MAINTAINER_pn-alsa-lib = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-alsa-plugins = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-alsa-state = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-alsa-tools = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt; +RECIPE_MAINTAINER_pn-alsa-ucm-conf = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-alsa-utils = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-alsa-utils-scripts = &quot;Tanu Kaskinen &lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;&quot;<br>
&gt; &gt;  RECIPE_MAINTAINER_pn-apmd = &quot;Anuj Mittal &lt;<a href="mailto:anuj.mittal@intel.com" target="_blank">anuj.mittal@intel.com</a>&gt;&quot;<br>
&gt; &gt; diff --git a/meta/recipes-multimedia/alsa/<a href="http://alsa-lib_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-lib_1.2.1.2.bb</a> b/meta/recipes-multimedia/alsa/<a href="http://alsa-lib_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-lib_1.2.1.2.bb</a><br>
&gt; &gt; index 9565ad1b20..7bc78b8523 100644<br>
&gt; &gt; --- a/meta/recipes-multimedia/alsa/<a href="http://alsa-lib_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-lib_1.2.1.2.bb</a><br>
&gt; &gt; +++ b/meta/recipes-multimedia/alsa/<a href="http://alsa-lib_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-lib_1.2.1.2.bb</a><br>
&gt; &gt; @@ -33,7 +33,7 @@ FILES_alsa-server = &quot;${bindir}/*&quot;<br>
&gt; &gt;  FILES_alsa-conf = &quot;${datadir}/alsa/&quot;<br>
&gt; &gt;  FILES_libatopology = &quot;${libdir}/libatopology.so.*&quot;<br>
&gt; &gt; <br>
&gt; &gt; -RDEPENDS_${PN}_class-target = &quot;alsa-conf&quot;<br>
&gt; &gt; +RDEPENDS_${PN}_class-target = &quot;alsa-conf alsa-ucm-conf&quot;<br>
&gt; &gt; <br>
&gt; &gt;  # upgrade path<br>
&gt; &gt;  RPROVIDES_${PN} = &quot;libasound&quot;<br>
&gt; &gt; diff --git a/meta/recipes-multimedia/alsa/<a href="http://alsa-ucm-conf_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-ucm-conf_1.2.1.2.bb</a> b/meta/recipes-multimedia/alsa/<a href="http://alsa-ucm-conf_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-ucm-conf_1.2.1.2.bb</a><br>
&gt; &gt; new file mode 100644<br>
&gt; &gt; index 0000000000..469d1f7a95<br>
&gt; &gt; --- /dev/null<br>
&gt; &gt; +++ b/meta/recipes-multimedia/alsa/<a href="http://alsa-ucm-conf_1.2.1.2.bb" rel="noreferrer" target="_blank">alsa-ucm-conf_1.2.1.2.bb</a><br>
&gt; &gt; @@ -0,0 +1,23 @@<br>
&gt; &gt; +SUMMARY = &quot;ALSA Use Case Manager configuration&quot;<br>
&gt; &gt; +HOMEPAGE = &quot;<a href="https://alsa-project.org" rel="noreferrer" target="_blank">https://alsa-project.org</a>&quot;<br>
&gt; &gt; +BUGTRACKER = &quot;<a href="https://alsa-project.org/wiki/Bug_Tracking" rel="noreferrer" target="_blank">https://alsa-project.org/wiki/Bug_Tracking</a>&quot;<br>
&gt; &gt; +LICENSE = &quot;BSD-3-Clause&quot;<br>
&gt; &gt; +LIC_FILES_CHKSUM = &quot;file://LICENSE;md5=20d74d74db9741697903372ad001d3b4&quot;<br>
&gt; &gt; +<br>
&gt; &gt; +# The tarball doesn&#39;t have any toplevel directory. The subdir option tells<br>
&gt; &gt; +# Bitbake to unpack the archive to the correct place.<br>
&gt; &gt; +SRC_URI = &quot;<a href="https://www.alsa-project.org/files/pub/lib/$%7BBP%7D.tar.bz2;subdir=$%7BBP%7D" rel="noreferrer" target="_blank">https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2;subdir=${BP}</a>&quot;<br>
&gt; &gt; +SRC_URI[md5sum] = &quot;b7fa43cfd79df978184a6333766d2a50&quot;<br>
&gt; &gt; +SRC_URI[sha256sum] = &quot;ea8a86875f4cf430d49a662a04a6d6c606c5c9d67e54cb944c4d77b24554062f&quot;<br>
&gt; &gt; +<br>
&gt; &gt; +inherit allarch<br>
&gt; <br>
&gt; it&#39;s a bit late into the game.. but I have some questions about this<br>
&gt; patch. now that the alsa-ucm-conf are allarch, how do we expect a BSP<br>
&gt; layer to provide its own UCM config files? if i add a .bbappend file,<br>
&gt; I can&#39;t change PACKAGE_ARCH to be &#39;machine&#39; specific. If i create a<br>
&gt; new recipe for my custom UCM files, then it&#39;s not obvious when I<br>
&gt; should install them, since we need them only if alsa-ucm-conf is<br>
&gt; installed in the first place..<br>
&gt; <br>
&gt; I was thinking about adding an empty alsa-ucm-machine-conf recipe that<br>
&gt; BSP could append,  like gpsd, e.g.:<br>
&gt; <a href="http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bb" rel="noreferrer" target="_blank">http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bb</a><br>
&gt; <br>
&gt; Is that a good idea?<br>
<br>
I was hoping someone else would answer this, since I have no experience<br>
with BSPs or .bbappend files... Since I don&#39;t know how this *should* be<br>
done, I&#39;m not against creating alsa-ucm-machine-conf. However, my<br>
intuition would be that the BSP installs its configuration as a<br>
separate recipe whenever the BSP is used. I don&#39;t see the need to have<br>
conditions such as &quot;install only if alsa-ucm-conf is installed&quot;. Is it<br>
just to save disk space? alsa-ucm-conf anyway installs a bunch of files<br>
that aren&#39;t relevant to most machines, so if you&#39;re worried about UCM<br>
disk consumption, the alsa-ucm-conf recipe would need work to somehow<br>
install only those files that are needed by the current machine.<br>
<br>
Another approach that would make sense to me (even more than creating a<br>
separate recipe) is to submit your UCM config to ALSA upstream. While<br>
waiting for the change to get accepted to upstream and then later<br>
incorporated in the main alsa-ucm-conf recipe, you could use .bbappend<br>
to add the configuration to the alsa-ucm-conf recipe as a patch.<br>
<br>
-- <br>
Tanu<br>
<br>
<a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
<a href="https://liberapay.com/tanuk" rel="noreferrer" target="_blank">https://liberapay.com/tanuk</a><br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>