Difference between revisions of "Audio Switching"

From BATC Wiki
Jump to navigation Jump to search
Line 51: Line 51:
 
  U0xeb1a0x2861
 
  U0xeb1a0x2861
 
  AV TO USB
 
  AV TO USB
 +
Grabby
  
 
This takes account of the following devices:
 
This takes account of the following devices:

Revision as of 19:30, 30 July 2017

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

This means that the following audio devices are supported by this logic:

Device [USB Audio Device], device 0: USB Audio [USB Audio]
Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
AUDIO [USB AUDIO], device 0: USB Audio [USB Audio]
Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]

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
Grabby

This takes account of the following devices:

usbtv [usbtv], device 0: USBTV Audio [USBTV Audio Input]
U0x534d0x21 [USB Device 0x534d:0x21], device 0: USB Audio [USB Audio]
STK1160 [STK1160], device 0: USB Audio [USB Audio]
U0xeb1a0x2861 [USB Device 0xeb1a:0x2861], device 0: USB Audio [USB Audio ]
USB20 [AV TO USB2.0], device 0: USB Audio [USB Audio]
Grabby (TerraTec Grabby), device 0: USB Audio (USB Audio)

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.