From b882b0d1aeb7b66c07f802fc1d688417e8447df8 Mon Sep 17 00:00:00 2001 From: jwoithe Date: Tue, 8 Oct 2013 12:46:55 +0000 Subject: [PATCH] rme: fix 'analog 1-8' bandwidth limit mode for the FF800. git-svn-id: svn+ssh://ffado.org/ffado/trunk@2425 2be59082-3212-0410-8809-b0798e1608f0 --- libffado/src/rme/rme_avdevice.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/libffado/src/rme/rme_avdevice.cpp b/libffado/src/rme/rme_avdevice.cpp index 977fd652..3e0b928d 100644 --- a/libffado/src/rme/rme_avdevice.cpp +++ b/libffado/src/rme/rme_avdevice.cpp @@ -818,7 +818,9 @@ Device::prepare() { // channels (which differs between devices), then add SPDIF channels if // relevant. Finally, the number of channels available from each ADAT // interface depends on sample rate: 0 at 4x, 4 at 2x and 8 at 1x. - if (m_rme_model == RME_MODEL_FIREFACE800) + // Note that "analog only" bandwidth limit mode means analog 1-8 + // regardless of the fireface model in use. + if (m_rme_model==RME_MODEL_FIREFACE800 && settings->limit_bandwidth!=FF_SWPARAM_BWLIMIT_ANALOG_ONLY) num_channels = 10; else num_channels = 8; @@ -1042,11 +1044,15 @@ Device::addDirPorts(enum Streaming::Port::E_Direction direction) { /* Apply bandwidth limit if selected. This effectively sets up the * number of adat and spdif channels assuming single-rate speed. + * The total number of expected analog channels is also set here. */ n_spdif = 2; + n_analog = (m_rme_model==RME_MODEL_FIREFACE800)?10:8; switch (dev_config->settings.limit_bandwidth) { case FF_SWPARAM_BWLIMIT_ANALOG_ONLY: n_adat = n_spdif = 0; + // "Analog only" means "Analog 1-8" regardless of the interface model + n_analog = 8; break; case FF_SWPARAM_BWLIMIT_ANALOG_SPDIF_ONLY: n_adat = 0; @@ -1060,12 +1066,9 @@ Device::addDirPorts(enum Streaming::Port::E_Direction direction) { n_adat = (m_rme_model==RME_MODEL_FIREFACE800)?16:8; } - /* Work out the number of analog channels based on the device model and - * adjust the spdif and ADAT channels according to the current sample + /* Adjust the spdif and ADAT channels according to the current sample * rate. */ - n_analog = (m_rme_model==RME_MODEL_FIREFACE800)?10:8; - n_phones = 0; if (sample_rate>=MIN_DOUBLE_SPEED && sample_ratesettings.limit_bandwidth!=FF_SWPARAM_BWLIMIT_ANALOG_ONLY) { + n_analog -= 2; + n_phones = 2; + } } id = std::string("dev?"); -- 2.11.4.GIT