Re: [meta-arago] [scarthgap][RFC PATCH 1/3] recipes-multimedia: Add pipewire configuration files

Yogesh Hegde <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arago
Message-ID <20260123064727.w4tn7ckeqber4kcd@yogi-work-pc>
Hi Paresh,

On 11:33-20260123, Paresh Bhagat via lists.yoctoproject.org wrote:
> - Add 92-capture.conf for capture configuration
> - Add 90-multichannel.conf for multichannel setup
> - Add pipewire_1.0.9.bbappend recipe extension
> 
> Signed-off-by: Paresh Bhagat <[email protected]>

Thanks for your patch! 

> ---
>  .../pipewire/pipewire/90-multichannel.conf      | 17 +++++++++++++++++
>  .../pipewire/pipewire/92-capture.conf           | 17 +++++++++++++++++
>  .../pipewire/pipewire_1.0.9.bbappend            | 14 ++++++++++++++
>  3 files changed, 48 insertions(+)
>  create mode 100644 meta-arago-distro/recipes-multimedia/pipewire/pipewire/90-multichannel.conf
>  create mode 100644 meta-arago-distro/recipes-multimedia/pipewire/pipewire/92-capture.conf
>  create mode 100644 meta-arago-distro/recipes-multimedia/pipewire/pipewire_1.0.9.bbappend
> 
> diff --git a/meta-arago-distro/recipes-multimedia/pipewire/pipewire/90-multichannel.conf b/meta-arago-distro/recipes-multimedia/pipewire/pipewire/90-multichannel.conf
> new file mode 100644
> index 00000000..1dd926bc
> --- /dev/null
> +++ b/meta-arago-distro/recipes-multimedia/pipewire/pipewire/90-multichannel.conf
> @@ -0,0 +1,17 @@
> +context.objects = [
> +    {
> +        factory = adapter
> +        args = {
> +            factory.name     = api.alsa.pcm.sink
> +            node.name        = "alsa_multidac_8ch"
> +            node.description = "Multi-DAC 8ch Output"
> +            media.class      = "Audio/Sink"
> +
> +            api.alsa.path = "hw:0,0"
> +            api.alsa.disable-mmap = true
> +
> +            audio.channels = 8
> +            audio.position = [ FL FR FC LFE RL RR SL SR ]
> +        }
> +    }
> +]
> diff --git a/meta-arago-distro/recipes-multimedia/pipewire/pipewire/92-capture.conf b/meta-arago-distro/recipes-multimedia/pipewire/pipewire/92-capture.conf
> new file mode 100644
> index 00000000..b0871da2
> --- /dev/null
> +++ b/meta-arago-distro/recipes-multimedia/pipewire/pipewire/92-capture.conf
> @@ -0,0 +1,17 @@
> +context.objects = [
> +    {
> +        factory = adapter
> +        args = {
> +            factory.name     = api.alsa.pcm.source
> +            node.name        = "alsa_multidac_4ch_capture"
> +            node.description = "ALSA 4ch Capture (L1 L2 R1 R2)"
> +            media.class      = Audio/Source

As per pipewire docs [0], Audio/Source should be in quotes. 

> +
> +            api.alsa.path = "hw:0,0"
> +            api.alsa.disable-mmap = true
> +
> +            audio.channels = 4
> +            audio.position = [ FL FR SL SR ]
> +        }
> +    }
> +]
> diff --git a/meta-arago-distro/recipes-multimedia/pipewire/pipewire_1.0.9.bbappend b/meta-arago-distro/recipes-multimedia/pipewire/pipewire_1.0.9.bbappend
> new file mode 100644
> index 00000000..29b17af3
> --- /dev/null
> +++ b/meta-arago-distro/recipes-multimedia/pipewire/pipewire_1.0.9.bbappend
> @@ -0,0 +1,14 @@
> +SRC_URI += " \
> +    file://90-multichannel.conf \
> +    file://92-capture.conf \
> +"
> +
> +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

FILESEXTRAPATHS should be before SRC_URI so that bitbake knows where to
find files mentioned in the SRC_URI. 

> +
> +do_install:append() {
> +    install -d ${D}${sysconfdir}/pipewire/pipewire.conf.d
> +    install -m 0644 ${WORKDIR}/90-multichannel.conf ${D}${sysconfdir}/pipewire/pipewire.conf.d/
> +    install -m 0644 ${WORKDIR}/92-capture.conf ${D}${sysconfdir}/pipewire/pipewire.conf.d/
> +}
> +
> +FILES:${PN} += " ${sysconfdir}"

Nitpick, packaging entire ${sysconfdir} might not be a best practice, best
would be to package only the required files or the pipewire.conf.d dir. 

FILES:${PN} += "${sysconfdir}/pipewire/pipewire.conf.d/*.conf"

[0]: https://docs.pipewire.org/page_man_pipewire_conf_5.html

Regards, 
- Yogesh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.