All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paresh Bhagat <p-bhagat@ti.com>
To: Yogesh Hegde <y-hegde@ti.com>
Cc: <meta-arago@lists.yoctoproject.org>, <denis@denix.org>,
	<reatmon@ti.com>, <v-singh1@ti.com>, <c-shilwant@ti.com>,
	<afd@ti.com>, <j-sahu@ti.com>, <praneeth@ti.com>,
	<s-sinha@ti.com>, <s-kapoor@ti.com>, <p-gupta5@ti.com>,
	<r-soni@ti.com>, <sen@ti.com>
Subject: Re: [master/wrynose][PATCH 3/4] recipes-multimedia: Add wireplumber audio configuration
Date: Wed, 16 Sep 2026 18:03:15 +0530	[thread overview]
Message-ID: <4a19a503-084b-47de-b1d9-04fd10173f60@ti.com> (raw)
In-Reply-To: <20260910082911.tskvsfvvpxln3qdw@uda1250336>

Hi Yogesh,


On 10/09/26 13:59, Yogesh Hegde wrote:
> Hi Paresh,
>
> On 08:32-20260901, Paresh Bhagat wrote:
>> Extend the wireplumber recipe to enable the session manager on all
>> plaorms and provide AM62D2 EVM specific audio initialization.
>> A set-audio-defaults.sh script is packaged to configure default audio
>> sinks and sources at runtime, managed by a dedicated systemd service
>> that runs after wireplumber starts.
>>
>> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
>> ---
>>   .../wireplumber/wireplumber-arago.inc         | 33 +++++++++++++++++++
>>   .../wireplumber/set-audio-defaults.service    | 21 ++++++++++++
>>   .../wireplumber/set-audio-defaults.sh         | 32 ++++++++++++++++++
>>   .../wireplumber/wireplumber_%.bbappend        |  4 +++
>>   4 files changed, 90 insertions(+)
>>   create mode 100644 meta-arago-distro/recipes-multimedia/wireplumber/wireplumber-arago.inc
>>   create mode 100644 meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.service
>>   create mode 100755 meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.sh
>>   create mode 100644 meta-arago-distro/recipes-multimedia/wireplumber/wireplumber_%.bbappend
>>
>> diff --git a/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber-arago.inc b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber-arago.inc
>> new file mode 100644
>> index 00000000..6325d26c
>> --- /dev/null
>> +++ b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber-arago.inc
>> @@ -0,0 +1,33 @@
>> +PR:append = ".arago1"
>> +
>> +FILESEXTRAPATHS:prepend:am62dxx-evm := "${THISDIR}/wireplumber:"
>> +
>> +SRC_URI:append:am62dxx-evm = " \
>> +    file://set-audio-defaults.sh \
>> +    file://set-audio-defaults.service \
>> +"
>> +
>> +inherit systemd
>> +
>> +# Enable wireplumber for all platforms
>> +SYSTEMD_PACKAGES = "${PN}"
>> +SYSTEMD_SERVICE:${PN} = "wireplumber.service"
> `wireplumber.service` file seems to be missing. `meta-openembedded` does
> not add the file neither does `meta-arago` nor the patch.


The service files comes from sources and not via yocto layers.


>
>> +SYSTEMD_AUTO_ENABLE:${PN} = "enable"
>> +
>> +do_install:append:am62dxx-evm() {
>> +    # Install the script
>> +    install -d ${D}${bindir}
>> +    install -m 0755 ${UNPACKDIR}/set-audio-defaults.sh ${D}${bindir}/
>> +
>> +    # Install the systemd service file
>> +    install -d ${D}${systemd_system_unitdir}
>> +    install -m 0644 ${UNPACKDIR}/set-audio-defaults.service ${D}${systemd_system_unitdir}/
>> +}
>> +
>> +SYSTEMD_PACKAGES:am62dxx-evm = "${PN}"
>> +SYSTEMD_SERVICE:${PN}:am62dxx-evm = "wireplumber.service set-audio-defaults.service"
> Consider append instead of `=` in the line above, so that the variable does not get
> overridden.


Thanks will correct this in next version.


>   
>
>> +SYSTEMD_AUTO_ENABLE:${PN}:am62dxx-evm = "enable"
> Is there a need to re-define `SYSTEMD_AUTO_ENABLE:${PN}:am62dxx-evm = "enable"`
> and `SYSTEMD_PACKAGES:am62dxx-evm = "${PN}"` ?


Will correct this in next version.


>
>> +
>> +FILES:${PN} += " \
>> +    ${bindir} \
>> +"
>> diff --git a/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.service b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.service
>> new file mode 100644
>> index 00000000..191b89f5
>> --- /dev/null
>> +++ b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.service
>> @@ -0,0 +1,21 @@
>> +[Unit]
>> +Description=Set PipeWire Default Audio Devices
>> +# Wait for pipewire and wireplumber services to be started
>> +After=pipewire.service wireplumber.service
>> +# Ensure udev has settled so audio devices are available
>> +After=systemd-udev-settle.service
>> +Wants=pipewire.service wireplumber.service
>> +
>> +[Service]
>> +Type=oneshot
>> +ExecStart=/usr/bin/set-audio-defaults.sh
>> +StandardOutput=append:/var/log/set-audio-defaults-output.log
>> +StandardError=append:/var/log/set-audio-defaults-error.log
>> +RemainAfterExit=yes
>> +TimeoutStartSec=90
>> +# Restart on failure with delay
>> +Restart=on-failure
>> +RestartSec=5
>> +
>> +[Install]
>> +WantedBy=multi-user.target
>> diff --git a/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.sh b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.sh
>> new file mode 100755
>> index 00000000..49be177e
>> --- /dev/null
>> +++ b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber/set-audio-defaults.sh
>> @@ -0,0 +1,32 @@
>> +#!/bin/sh
>> +
>> +# Wait for WirePlumber to be ready
>> +i=1
>> +while [ "$i" -le 30 ]; do
>> +    wpctl status >/dev/null 2>&1 && break
>> +    sleep 1
>> +    i=$((i + 1))
>> +done
>> +
>> +# Additional delay for nodes to appear
>> +sleep 2
>> +
>> +# Find audio sink ID
>> +SINK_ID=$(pw-cli info alsa_audio_sink 2>/dev/null | head -n 1 | awk '{print $2}')
>> +if [ -n "$SINK_ID" ]; then
>> +    wpctl set-default "$SINK_ID"
>> +    echo "Set default sink to ID: $SINK_ID (alsa_audio_sink)"
>> +else
>> +    echo "Could not find alsa_audio_sink"
>> +fi
>> +
>> +# Find audio source ID
>> +SOURCE_ID=$(pw-cli info alsa_audio_source 2>/dev/null | head -n 1 | awk '{print $2}')
>> +if [ -n "$SOURCE_ID" ]; then
>> +    wpctl set-default "$SOURCE_ID"
>> +    echo "Set default source to ID: $SOURCE_ID (alsa_audio_source)"
>> +else
>> +    echo "Could not find alsa_audio_source"
>> +fi
>> +
>> +echo "Done"
>> diff --git a/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber_%.bbappend b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber_%.bbappend
>> new file mode 100644
>> index 00000000..541b2963
>> --- /dev/null
>> +++ b/meta-arago-distro/recipes-multimedia/wireplumber/wireplumber_%.bbappend
>> @@ -0,0 +1,4 @@
>> +WIREPLUMBER_ARAGO = ""
>> +WIREPLUMBER_ARAGO:arago = "wireplumber-arago.inc"
>> +
>> +require ${WIREPLUMBER_ARAGO}
> -- Yogesh


  reply	other threads:[~2026-09-16 12:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  3:02 [master/wrynose][PATCH 0/4] Add PipeWire audio stack Paresh Bhagat
2026-09-01  3:02 ` [master/wrynose][PATCH 1/4] packagegroup-arago-connectivity: Remove pulseaudio Paresh Bhagat
2026-09-01  3:02 ` [master/wrynose][PATCH 2/4] recipes-multimedia: Add PipeWire bbappend, service and config files Paresh Bhagat
2026-09-02 17:05   ` Ryan Eatmon
2026-09-03 14:56     ` Paresh Bhagat
2026-09-10  8:15   ` Yogesh Hegde
2026-09-16 12:30     ` Paresh Bhagat
2026-09-01  3:02 ` [master/wrynose][PATCH 3/4] recipes-multimedia: Add wireplumber audio configuration Paresh Bhagat
2026-09-10  8:29   ` Yogesh Hegde
2026-09-16 12:33     ` Paresh Bhagat [this message]
2026-09-01  3:02 ` [master/wrynose][PATCH 4/4] recipes-core: arago-default-image: Add PipeWire audio stack Paresh Bhagat
2026-09-10  8:32   ` Yogesh Hegde
2026-09-01  3:25 ` [master/wrynose][PATCH 0/4] " PRC Automation

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a19a503-084b-47de-b1d9-04fd10173f60@ti.com \
    --to=p-bhagat@ti.com \
    --cc=afd@ti.com \
    --cc=c-shilwant@ti.com \
    --cc=denis@denix.org \
    --cc=j-sahu@ti.com \
    --cc=meta-arago@lists.yoctoproject.org \
    --cc=p-gupta5@ti.com \
    --cc=praneeth@ti.com \
    --cc=r-soni@ti.com \
    --cc=reatmon@ti.com \
    --cc=s-kapoor@ti.com \
    --cc=s-sinha@ti.com \
    --cc=sen@ti.com \
    --cc=v-singh1@ti.com \
    --cc=y-hegde@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.