From 64f0cc36ccff8dba2f8f40d1596452a9d53c2fa4 Mon Sep 17 00:00:00 2001 From: "Geoffrey D. Bennett" Date: Sat, 8 Feb 2025 20:55:16 +1030 Subject: [PATCH] Gen 1: Add PC_OFF port category --- src/alsa.c | 1 + src/alsa.h | 20 ++++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/alsa.c b/src/alsa.c index 97bf5b6..b4bfb55 100644 --- a/src/alsa.c +++ b/src/alsa.c @@ -12,6 +12,7 @@ // names for the port categories const char *port_category_names[PC_COUNT] = { + NULL, "Hardware Outputs", "Mixer Inputs", "DSP Inputs", diff --git a/src/alsa.h b/src/alsa.h index 4bd21b2..0d839a4 100644 --- a/src/alsa.h +++ b/src/alsa.h @@ -22,20 +22,12 @@ typedef void (AlsaElemCallback)(struct alsa_elem *, void *); // port categories for routing_src and routing_snk entries // must match the level meter ordering from the driver enum { - // Hardware inputs/outputs - PC_HW = 0, - - // Mixer inputs/outputs - PC_MIX = 1, - - // DSP inputs/outputs - PC_DSP = 2, - - // PCM inputs/outputs - PC_PCM = 3, - - // number of port categories - PC_COUNT = 4 + PC_OFF, // Off (the source when a sink is not connected) + PC_HW, // Hardware inputs/outputs + PC_MIX, // Mixer inputs/outputs + PC_DSP, // DSP inputs/outputs + PC_PCM, // PCM inputs/outputs + PC_COUNT // number of port categories }; // names for the port categories