Skip to content

Configuration settings

Josef Nevrly edited this page Apr 14, 2017 · 2 revisions

An universal configuration utility called ConCon is used to configure SMkII. Currently, this tool is only supporting command-line interface, which allows downloading and retrieving configuration to and from SMkII in the form of self-documented text configuration files.

ConCon is a multiplatform utility written in Python. A Windows binary is also distributed to simplify the usage. Examples in this document are all Linux-based, but the usage patterns are exactly the same for python concon.py and concon.exe.

Reading existing configuration from SMkII to a file

#python concon.py -r -d config_file.cfg

Downloading new configuration from a file to SMkII

#python concon.py -w -d config_file.cfg

Configuration file

Configuration files contain simple descriptions of the parameters, but on the whole, can be separated into several sections:

HW Init and Connector reset call functions

Settings: Initialize board hardware, Reset connector I/O's

These settings are prepared for UI-based version of the tool and can be safely ignored in the file-based configuration.

I/O direction settings (Isolator settings) and CLK Master-slave settings

Settings: MCLK direction, BCLK role and direction, FSYNC role and direction

Using these settings it's possible to configure SMkII as I2S Master or Slave. Note that SMkII MCLK, BCLK and FSYNC roles can be configured independently, so that SMkII can be (e.g.) BCLK Master and FSYNC Slave at the same time. Usual configurations however set the same role to all clocks.

Using MCLK

As explained in Functional description, while BCLK and FSYNC I/Os are necessary for providing audio stream to/from DUT, for MCLK it's only necessary to output it when DUT requires it. Using MCLK as Input is not necessary at all for SMkII operation as recording device.

Utility signals direction and status settings

Settings: MUTE direction, Set mute flag, Set RESET_I2S direction, Set reset I2S flag

For usual operation it's safe to keep all direction settings for those signals in HiZ and ignore them afterwards. For closer explanation, see Utility signals.

Data I/O settings

Settings: Set TX_DATA direction, Set RX_DATA direction,

As explained in Functional description, TX and RX lines can be disabled/set to HiZ if required.

Clock settings

Settings: MCLK frequency, Offset of MCLK in PPM, BCLK frequency, Auto tune PLL when audio feedback not work

These settings configure the basic system clocks - MCLK and BCLK and their mode of operation (Adaptive PLL). Detailed description of clock operation is described in section Clock system.

Data format settings

Settings: Set word size, Digital audio interface mode, Word offset (delay between FSYNC and TX/RX_DATA), RX FSYNC edge, TX FSYNC edge, RX BCLK sampling edge, TX BCLK transmitting edge

Apart of the Set word size, there is one basic setting - Digital audio interface mode. This is a sort of master setting which defines the style of digital audio format. Possible values are:

  • I2S
  • DSP
  • Left Justified
  • Right Justified These serial audio formats are standards which description is not part of this document, but can be found elsewhere. Selecting one of these formats will preset all other settings in this section with the default value appropriate for the selected format. However, in case DUT does not use the perfect implementation of the above-selected format (there are variations and deviations), it's possible to fine-tune the format parameters using the other settings in this section.

Logical number setting

Settings: Add number behind device name

This allows setting the SMkII logical unit number for multi-unit use. Configuration must be saved to EEPROM and SMkII needs to be restarted for this setting to take effect.

Configuration saving and loading

Settings: Restore saved settings, Load default factory settings, Save all settings

These are one-time settings (or calls) to control SMkII's internal persitence memory (EEPROM). Load default factory settings and Save all settings are the only meaningful settings in the config-file based operation.

Saving configuration in SMkII

Always set Save all settings to 1 for the config file to be saved into EEPROM. If kept on 0, the configuration will be only preserved until device reset or I2S Reset.

Note that the Save all settings itself is not saved into EEPROM. Therefore if configuration is read from SMkII, this value will be always default (=0).

Linux privileges

Superuser privileges may be required to use the concon tool in Linux due to the use of Raw USB HID functions. To avoid sudoing for each use, modify file /etc/udev/rules.d/99-hidraw-permissions.rules by adding following line:

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="usb"

and then add required user to the group usb (or any other group you prepare for this use).