Drivers Audiodata
The TV Input Framework (TIF) manager works with the audio routing API to support flexible audiopath changes. When a System on Chip (SoC) implements the TV hardware abstraction layer (HAL), eachTV input (HDMI IN, Tuner, etc.) provides TvInputHardwareInfo
that specifies AudioPort information for audio type and address.
- Physical audio input/output devices have a corresponding AudioPort.
- Software audio output/input streams are represented as AudioMixPort (child class ofAudioPort).
Android uses a wide variety of audio data formats internally, and exposes a subset of these in public APIs, file formats, and the Hardware Abstraction Layer (HAL). The audio data formats are classified by their properties: Compression Uncompressed, lossless compressed, or lossy compressed. PCM is the most common uncompressed audio. An audio driver’s purpose, then, is to ensure that whatever audio device you’re using, whether it’s your computer’s local audio device, or, more preferably, an audio interface you connect to it, is communicating with your software program, such as a digital audio workstation, or audio plugins. VOX 2ch Audio Driver for Windows v2.0.0 Release Note. The VOX 2ch USB-ASIO Driver allows certain VOX Products to be used as an ASIO compatible USB audio interface. With this driver, you can play and record audio with very low latency with an ASIO compatible application. – Based on ‘Standard ASIO 2.1’ – 2 Input, 2 Output – Sampling.
The TIF then uses AudioPort information for the audio routing API.
Figure 1. TV Input Framework (TIF)
Requirements
A SoC must implement the audio HAL with the following audio routing API support:
Audio Ports |
|
---|---|
Default Input | AudioRecord (created with DEFAULT input source) must seize virtual null input source forAUDIO_DEVICE_IN_DEFAULT acquisition on Android TV. |
Device Loopback | Requires supporting an AUDIO_DEVICE_IN_LOOPBACK input that is a complete mix of all audio outputof all the TV output (11Khz, 16bit mono or 48Khz, 16bit mono). Used only for audio capture. |
TV audio devices
Android supports the following audio devices for TV audio input/output.
system/media/audio/include/system/audio.h
Note: In Android 5.1 and earlier, the path tothis file is: system/core/include/system/audio.h
Audio HAL extension
The Audio HAL extension for the audio routing API is defined by following:
system/media/audio/include/system/audio.h
Note: In Android 5.1 and earlier, the path tothis file is: system/core/include/system/audio.h
hardware/libhardware/include/hardware/audio.h
Testing DEVICE_IN_LOOPBACK
To test DEVICE_IN_LOOPBACK for TV monitoring, use the following testing code. After running thetest, the captured audio saves to /sdcard/record_loopback.raw
, where you can listen toit using FFmpeg
.
Locate the captured audio file in /sdcard/record_loopback.raw
and listen to it usingFFmpeg
:
Use cases
This section includes common use cases for TV audio.
TV tuner with speaker output
When a TV tuner becomes active, the audio routing API creates an audio patch between the tunerand the default output (e.g. the speaker). The tuner output does not require decoding, but finalaudio output is mixed with software output_stream.
Figure 2. Audio Patch for TV tuner with speaker output.
HDMI OUT during live TV
A user is watching live TV then switches to the HDMI audio output (Intent.ACTION_HDMI_AUDIO_PLUG). The output device of all output_streams changes to the HDMI_OUT port, and the TIF manager changesthe sink port of the existing tuner audio patch to the HDMI_OUT port.
Figure 3. Audio Patch for HDMI OUT from live TV.
When you set inputs and outputs for recording and playback in Adobe Audition 3, you have a choice of sound card drivers: an ASIO (Audio Stream In/Out) driver, or the Audition 3.0 Windows Sound driver.
This document describes how to select a driver and how to configure each kind of driver.
Understanding ASIO and Audition Windows Sound drivers
Audition 3.0 Windows Sound is the default driver, but Adobe recommends that you select an ASIO driver.
ASIO is a multichannel protocol that allows compatible software to use the multichannel capabilities of ASIO-compliant sound cards.
The benefits of ASIO include:
- Lower signal latency.
- More efficient audio processing.
- Higher data throughput.
- More accurate channel synchronization.
- Better extensibility of audio hardware.
- Greater flexibility of sample rates, sample formats, and input/output channel mapping for playback and recording.
- The ability to record from two or more inputs simultaneously.
If you are using an ASIO-compliant audio device, then you should download and install an ASIO driver that is specifically designed for that device.
If the device manufacturer does not provide an ASIO driver, then you can install a third-party ASIO driver, such as ASIO4ALL; however, a third-party driver may not support all of the device's features.
If you are not able to obtain an ASIO driver, or if you are not using ASIO-compliant audio devices, then use the Audition 3.0 Windows Sound driver.
Audition 3.0 Windows Sound is an emulated driver which uses the system DirectSound driver.
Drivers Audio Dell
Audition 3.0 Windows Sound provides no additional device functionality beyond what the DirectSound driver offers. For example, the DirectSound driver may be limited to stereo input and output.
Drivers Audio Lenovo
- Click the Edit View, Multitrack View, or Surround Encoder tab.
Note: The Edit View, Multitrack View, and Surround Encoder each have their own driver settings. You must configure driver settings for each view individually. - In the Audio Driver pop-up menu, choose a driver for the sound card you wish to use.
Choose an ASIO driver if one is listed; otherwise, choose Audition 3.0 Windows Sound.
If you chose an ASIO driver in Step 3, then go to Configuring an ASIO driver.
If you chose Audition 3.0 Windows Sound in Step 3, then go to Configuring the Audition 3.0 Windows Sound driver.
The window that appears after you click Control Panel displays the proprietary settings of the ASIO driver that you selected. These setting vary from driver to driver.
For details about these settings, see your sound card's documentation, contact the cardâs manufacturer, or contact the publisher of the driver.
Configuring the Audition 3.0 Windows Sound driver
You will configure the Audition 3.0 Windows Sound driver in the DirectSound Full Duplex Setup window. The options in this window are as follows:
Drivers Audio Data Tool
- Device Name
The Device Name column lists all available DirectSound outputs and inputs. To activate or deactivate a port, click the box next to the port. If the option box contains an 'X', then the port is activated.
- Buffer Size [Samples]
The Buffer Size [Samples] column displays the number of samples that will be included in the buffer. The audio buffer is used when audio data is transferred between Audition and the sound card. The default Buffer Size is 2048 samples.
A large buffer ensures that playback occurs without audio dropout or other glitches. However, increasing the buffer size increases the audio data latency which may cause delay between the moment Audition begins sending audio data and the moment it actually reaches the physical output. In general, lowering the buffer size improves playback while increasing it will improve recording, but the goal of setting the buffer should be to find a balance between the two.
To change the Buffer Size [Samples] value, double-click the field and enter a different number of samples.
Note the following Buffer Size guidelines:
- To improve recording performance, lower the buffer size (optimal range is 32 to 256 samples).
- To improve playback performance, increase the buffer size (optimal range is 512 to 2048 samples).
- Offset [Samples]
The Offset [Samples] value affects latency of the input or output signal between multiple sound cards.
To change the Offset [Samples] value, double-click the field and enter a different number of samples.
- Audio Channels, Bits per Sample
The Audio Channels and Bits per Sample columns provide information about your sound card. The values in these columns cannot be adjusted using the DirectSound Full Duplex Setup. See the documentation for your sound card for more information on how to change these settings.
- Sync Reference
The Sync Reference setting specifies which sound card clock is used as a reference when you activate multiple sound cards. The sound card in the topmost position is used as the Sync Reference. The DirectSound Output option is selected as the default Sync Reference.
Note: Use Sync Reference to synchronize two or more digital audio devices for sample-accurate recording.
- Port Order
The Port Order section allows you to click Move Up or Move Down to move the selected sound device up or down in the input/output port order. The active port (indicated by an 'X' next to the device name) should be first in the list of the available ports.
- Card Options
The Card Options section displays these two options:
- Full Duplex: Allows recording (input) and playback (output) to occur simultaneously. If the selected sound card supports Full Duplex, the option should appear as activated.
- Start Input First: Specifies that the input port is initiated first for any audio hardware procedure. If the sound card doesn't seem to work correctly with Full Duplex activated (for example, you cannot play back and record at the same time), try activating this option before deactivating Full Duplex.