From 5dcd693973aa4883b2cf5b5504e8f3e646850e22 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sun, 12 Jun 2022 18:59:44 +0200 Subject: [PATCH] ucm2: direct profile - allow to override the card name Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/160 Signed-off-by: Jaroslav Kysela --- ucm2/USB-Audio/Behringer/Flow8-Recording.conf | 1 + ucm2/USB-Audio/Behringer/Flow8-Streaming.conf | 1 + ucm2/common/direct.conf | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ucm2/USB-Audio/Behringer/Flow8-Recording.conf b/ucm2/USB-Audio/Behringer/Flow8-Recording.conf index 0786d2f..173901a 100644 --- a/ucm2/USB-Audio/Behringer/Flow8-Recording.conf +++ b/ucm2/USB-Audio/Behringer/Flow8-Recording.conf @@ -5,6 +5,7 @@ SectionUseCase."Recording" { File "/USB-Audio/Behringer/Flow8-Recording-Hifi.conf" } +Define.DirectCardName "Flow8 Recording" Define.DirectPlaybackChannels 4 Define.DirectCaptureChannels 10 diff --git a/ucm2/USB-Audio/Behringer/Flow8-Streaming.conf b/ucm2/USB-Audio/Behringer/Flow8-Streaming.conf index 6a1f4cc..d8152f8 100644 --- a/ucm2/USB-Audio/Behringer/Flow8-Streaming.conf +++ b/ucm2/USB-Audio/Behringer/Flow8-Streaming.conf @@ -5,6 +5,7 @@ SectionUseCase."Streaming" { File "/USB-Audio/Behringer/Flow8-Streaming-Hifi.conf" } +Define.DirectCardName "Flow8 Streaming" Define.DirectPlaybackChannels 4 Define.DirectCaptureChannels 2 diff --git a/ucm2/common/direct.conf b/ucm2/common/direct.conf index ec70520..f69cbc9 100644 --- a/ucm2/common/direct.conf +++ b/ucm2/common/direct.conf @@ -1,4 +1,12 @@ +If.direct { + Condition { + Type String + Empty "${var:DirectCardName}" + } + True.Define.DirectCardName "${CardName}" +} + SectionUseCase."Direct" { - Comment "Direct ${CardName}" + Comment "Direct ${var:DirectCardName}" File "/common/direct-verb.conf" } -- 2.47.1