From 403610eed968823aff507d44e4945be774c6fb37 Mon Sep 17 00:00:00 2001 From: Hoang Bui <47828508+bongbui321@users.noreply.github.com> Date: Tue, 23 Jan 2024 02:10:17 -0500 Subject: [PATCH] CI: enable virtual audio sink for soundd (#31120) * enable virtual sound * mv install to dockerfile * cleaner --------- Co-authored-by: Justin Newberry --- Dockerfile.openpilot_base | 2 +- selfdrive/test/setup_vsound.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 selfdrive/test/setup_vsound.sh diff --git a/Dockerfile.openpilot_base b/Dockerfile.openpilot_base index 028d877a93fe5f..5d3d26c981bdb8 100644 --- a/Dockerfile.openpilot_base +++ b/Dockerfile.openpilot_base @@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED 1 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - apt-get install -y --no-install-recommends sudo tzdata locales ssh && \ + apt-get install -y --no-install-recommends sudo tzdata locales ssh pulseaudio && \ rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen diff --git a/selfdrive/test/setup_vsound.sh b/selfdrive/test/setup_vsound.sh new file mode 100755 index 00000000000000..a6601d0a61d0ac --- /dev/null +++ b/selfdrive/test/setup_vsound.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +{ + #start pulseaudio daemon + sudo pulseaudio -D + + # create a virtual null audio and set it to default device + sudo pactl load-module module-null-sink sink_name=virtual_audio + sudo pactl set-default-sink virtual_audio +} > /dev/null 2>&1