Setting the clock source
use
test-ffado Discover
to obtain the clock sources and their id for all connected devices:
... 4293101857: Debug (devicemanager.cpp)[ 122] show: ===== Device Manager ===== 4293101885: Debug (Element.cpp)[ 59] show: Element DeviceManager 4293101915: Debug (devicemanager.cpp)[ 125] show: 1394 port: 0 4293101937: Debug (devicemanager.cpp)[ 133] show: --- Device 0 --- 4293101959: Debug (focusrite_saffirepro.cpp)[ 291] showDevice: This is a BeBoB::Focusrite::SaffireProDevice 4293102001: Debug (focusrite_generic.cpp)[ 44] showDevice: This is a BeBoB::Focusrite::FocusriteDevice 4293102025: Debug (bebob_avdevice.cpp)[ 184] showDevice: Device is a BeBoB device 4293102052: Debug (ffadodevice.cpp)[ 149] showDevice: Node...........: 1 4293102076: Debug (ffadodevice.cpp)[ 150] showDevice: GUID...........: 00130e01000307cd 4293102104: Debug (ffadodevice.cpp)[ 155] showDevice: Assigned ID....: dev0 4293102132: Debug (avc_avdevice.cpp)[ 397] showDevice: "Focusrite" "Saffire Pro26IO" 4293102157: Debug (devicemanager.cpp)[ 136] show: Clock sync sources: 4293102262: Debug (devicemanager.cpp)[ 145] show: Type: Compound Syt Match, Id: 22, Valid: 1, Active: 0, Description: Syt Match 4293102288: Debug (devicemanager.cpp)[ 145] show: Type: Internal , Id: 21, Valid: 1, Active: 1, Description: Internal (CSP) 4293102311: Debug (devicemanager.cpp)[ 145] show: Type: SPDIF , Id: 31, Valid: 1, Active: 0, Description: Ext SPDIF Input 4293102334: Debug (devicemanager.cpp)[ 145] show: Type: ADAT , Id: 32, Valid: 1, Active: 0, Description: Ext ADAT/SMUX Input 1 4293102357: Debug (devicemanager.cpp)[ 145] show: Type: ADAT , Id: 33, Valid: 1, Active: 0, Description: Ext ADAT/SMUX Input 2 4293102379: Debug (devicemanager.cpp)[ 145] show: Type: WordClock , Id: 34, Valid: 1, Active: 0, Description: Ext WClock Input 4293102422: Debug (focusrite_saffirepro.cpp)[ 252] destroyMixer: destroy mixer... ...
Get the node id (1 in this case) from the summary. Also get the clock id for the source you want to use (e.g. 34 for WordClock?).
Then use the following command to set the clock source:
test-ffado -n NODE_ID SetClockSource CLOCK_ID
e.g. to select wordclock in this example:
test-ffado -n 1 SetClockSource 34
Then use the Discover command to check whether the selection was successful.
... 0237343894: Debug (devicemanager.cpp)[ 122] show: ===== Device Manager ===== 0237343922: Debug (Element.cpp)[ 59] show: Element DeviceManager 0237343951: Debug (devicemanager.cpp)[ 125] show: 1394 port: 0 0237343972: Debug (devicemanager.cpp)[ 133] show: --- Device 0 --- 0237343994: Debug (focusrite_saffirepro.cpp)[ 291] showDevice: This is a BeBoB::Focusrite::SaffireProDevice 0237344017: Debug (focusrite_generic.cpp)[ 44] showDevice: This is a BeBoB::Focusrite::FocusriteDevice 0237344040: Debug (bebob_avdevice.cpp)[ 184] showDevice: Device is a BeBoB device 0237344066: Debug (ffadodevice.cpp)[ 149] showDevice: Node...........: 1 0237344090: Debug (ffadodevice.cpp)[ 150] showDevice: GUID...........: 00130e01000307cd 0237344117: Debug (ffadodevice.cpp)[ 155] showDevice: Assigned ID....: dev0 0237344146: Debug (avc_avdevice.cpp)[ 397] showDevice: "Focusrite" "Saffire Pro26IO" 0237344171: Debug (devicemanager.cpp)[ 136] show: Clock sync sources: 0237344277: Debug (devicemanager.cpp)[ 145] show: Type: Compound Syt Match, Id: 22, Valid: 1, Active: 0, Description: Syt Match 0237344303: Debug (devicemanager.cpp)[ 145] show: Type: Internal , Id: 21, Valid: 1, Active: 0, Description: Internal (CSP) 0237344327: Debug (devicemanager.cpp)[ 145] show: Type: SPDIF , Id: 31, Valid: 1, Active: 0, Description: Ext SPDIF Input 0237344350: Debug (devicemanager.cpp)[ 145] show: Type: ADAT , Id: 32, Valid: 1, Active: 0, Description: Ext ADAT/SMUX Input 1 0237344372: Debug (devicemanager.cpp)[ 145] show: Type: ADAT , Id: 33, Valid: 1, Active: 0, Description: Ext ADAT/SMUX Input 2 0237344394: Debug (devicemanager.cpp)[ 145] show: Type: WordClock , Id: 34, Valid: 1, Active: 1, Description: Ext WClock Input 0237344436: Debug (focusrite_saffirepro.cpp)[ 252] destroyMixer: destroy mixer... ...
Note that now the WordClock? line is Active.
Also note that the device can reject this command if the clock source is not valid/suitable, e.g. because there is no signal present.
