Audio Switching

From BATC Wiki
Revision as of 19:23, 25 July 2017 by G8GKQ (talk | contribs)
Jump to navigation Jump to search

The capability to transmit or stream sound from either the video capture device (EasyCap) or a microphone connected through a cheap USB dongle was overhauled and further developed in software 201707221.

In the Console, System Setup, Audio Input menu there are 5 options: auto, mic, video, bleeps and no_audio. The switching behaviour is as follows:

1 If "no_audio" is selected, no audio stream is generated.

2 If "bleeps" is selected, mono bleeps are transmitted.

3 If neither an EasyCap or USB Sound Dongle is detected (see below), no audio channel is generated, unless the option for "bleeps" has been requested. In which case "bleeps" are generated.

4 In "auto" mode:

If both an EasyCap and a USB Sound Dongle are detected, the video source is checked. If video from the Pi Cam is selected, mono audio from the USB Sound Dongle is transmitted. If the EasyCap is selected for video, stereo audio from the EasyCap is transmitted.

If only a USB Sound Dongle is detected, mono audio from the USB Sound Dongle is transmitted.

If only an EasyCap is detected, stereo audio from the EasyCap is transmitted.

5 In "mic" mode, if a USB Sound Dongle is detected, mono audio from the USB Sound Dongle is transmitted. If no USB Sound Dongle is detected, but an EasyCap is, stereo audio from the EasyCap is transmitted.

6. In "video" mode, if an EasyCap is detected, stereo audio from the EasyCap is transmitted. If no EasyCap is detected, but a USB Sound Dongle is, mono audio from the USB Sound Dongle is transmitted.

The "auto", "mic" and "EC" (video) modes can also be selected from Menu 2 of the Touchscreen.

Identification of Audio Devices

Audio devices are identified as being Microphone Dongles or EasyCaps by analysing the response to the Linux command "arecord -l".

If the response includes any of the following strings (case sensitive) , the device is classed as a USB Microphone Dongle:

USB Audio Device
USB AUDIO
Head
Sound Device

If the response includes any of the following strings, the device is classed as a video capture device:

usbtv
U0x534d0x21
DVC90
Cx231xxAudio
STK1160
U0xeb1a0x2861
AV TO USB

Note that inclusion in this list does not mean that the Portsdown will work with the device for video capture. All it means is that it can capture audio from it; in particular, the DVC90 and Cx231xxAudio devices will not work for video capture (yet).

If you want an entry added to either of these lists (which each appear twice between lines 70 and 100 in the file scripts/a.sh) please post full details on the BATC Forum.