feat: add PipeWire multi-channel audio driver (full-duplex N channel)
- PipeWireDriver.hpp/cpp: new AudioDriver implementation using pw_filter API - Full-duplex I/O via pw_filter (capture + playback in one RT callback) - Dynamic channel count support (tested: 1-8 channels, extensible beyond) - Uses SPA_AUDIO_FORMAT_F32 for zero-copy-compatible float processing - Channel position mapping: MONO, stereo, 5.1, 7.1, plus Aux for N>8 - Follows the same buffer management pattern as AlsaDriverImpl - Channel routing: main/aux input/output mapping with mix ops - CLI flag: --driver pipewire|alsa (default: alsa) - AudioHost: conditional driver selection based on driverType_ - PiPedalModel: stores and passes driver type to AudioHost - CMakeLists.txt: added PipeWireDriver source files
This commit is contained in:
@@ -185,6 +185,7 @@ int main(int argc, char *argv[])
|
||||
bool testExtraDevice = false;
|
||||
std::string logLevel;
|
||||
std::string portOption;
|
||||
std::string driverOption = "alsa";
|
||||
|
||||
CommandLineParser parser;
|
||||
parser.AddOption("-h", &help);
|
||||
@@ -193,6 +194,7 @@ int main(int argc, char *argv[])
|
||||
parser.AddOption("-log-level", &logLevel);
|
||||
parser.AddOption("-port", &portOption);
|
||||
parser.AddOption("-test-extra-device", &testExtraDevice); // advertise two different devices (for testing multi-device connect)
|
||||
parser.AddOption("--driver", &driverOption);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -226,6 +228,7 @@ int main(int argc, char *argv[])
|
||||
<< " -systemd: Log to systemd journals instead of to the console.\n"
|
||||
<< " -port: Port to listen on e.g. 80, or 0.0.0.0:80\n"
|
||||
<< " -log-level: (debug|info|warning|error)\n"
|
||||
<< " --driver: Audio driver (alsa|pipewire, default: alsa)\n"
|
||||
<< "Example:\n"
|
||||
<< " pipedald /etc/pipedal/config /etc/pipedal/react -port 80 \n"
|
||||
"\n"
|
||||
@@ -398,6 +401,7 @@ int main(int argc, char *argv[])
|
||||
});
|
||||
|
||||
model.Init(configuration);
|
||||
model.SetDriverType(driverOption);
|
||||
|
||||
// Get heavy IO out of the way before letting dependent (Jack/ALSA) services run.
|
||||
model.LoadLv2PluginInfo();
|
||||
|
||||
Reference in New Issue
Block a user