Other hardware: Difference between revisions

From Hydrogenaudio Knowledgebase
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Bluetooth ==
== Bluetooth ==


Bluetooth has two unusual requirements: codec complexity and latency. Complexity decides battery life, but with the codec doing less work, it's not usual to see bitrate/quality trades way worse than conventional codecs.
Bluetooth has two unusual requirements: codec complexity and latency. Complexity (bitrate too, to an extent) decides battery life, but with the codec doing less work, it's not usual to see bitrate/quality trades way worse than conventional codecs.


=== A2DP ===
=== A2DP ===
Line 46: Line 46:


* It's [https://www.etsi.org/deliver/etsi_tr/103500_103599/103590/01.01.01_60/tr_103590v010101p.pdf allegedly] "better than Opus" with respect to error tolerance in speech environments. Except the test is done with speech samples in the non-speech, non-FEC mode of Opus (CELT), at minimum complexity (effort), and an old version at that.
* It's [https://www.etsi.org/deliver/etsi_tr/103500_103599/103590/01.01.01_60/tr_103590v010101p.pdf allegedly] "better than Opus" with respect to error tolerance in speech environments. Except the test is done with speech samples in the non-speech, non-FEC mode of Opus (CELT), at minimum complexity (effort), and an old version at that.
* No [[joint stereo]] is available.
* No [[joint stereo]] is available. The rationale given is that this allows True Wireless Stereo (TWS) to work with the audio source transmitting direct to each headphone, without needing an intermediate decode.
* LC3plus, LC3's "high-res" cousin available over A2DP, is [https://hydrogenaud.io/index.php/topic,121850.0.html worse than Apple and Android (FDK) AAC at 144 kbps]. The Japan Audio Society nevertheless thinks that's enough for a "Hi-Res AUDIO WIRELESS" sticker.
* LC3plus, LC3's "high-res" cousin available over A2DP, is [https://hydrogenaud.io/index.php/topic,121850.0.html worse than Apple and Android (FDK) AAC at 144 kbps]. The Japan Audio Society nevertheless thinks that's enough for a "Hi-Res AUDIO WIRELESS" sticker.


In any case, it's much better than SBC and retains the low complexity character. It is not the best use of the bandwidth available, but a lot of things can be excused with "low complexity". Google's open source [https://github.com/google/liblc3 liblc3] implementation is written to the word of the BT spec.
In any case, it's much better than SBC and retains the low complexity character. When given more bits, such as with the 96*2 and 124*2 standard profiles, it can be very acceptable. Google's open source [https://github.com/google/liblc3 liblc3] implementation is written to the word of the BT spec.
 
=== Operating systems ===
 
Bluetooth codec support is not great on Windows. Windows 10 has SBC and AptX. Windows 11 introduces AAC as a better-than-SBC fallback on non-Qualcomm devices; it also introduces LE Audio support. There is no support for any codec variant such as AptX-HD. You can use a [https://www.bluetoothgoodies.com/a2dp/ third-party driver] ($5.99 trialware) that does A2DP its own way to get the better codecs.
 
With PipeWire and BlueZ 5, Linux has support for many codecs: AptX (including LL and HD), LDAC, FastStream, both versions of Opus, LC3plus, and SBC XQ. The modern, PipeWire-based Linux audio stack can have very low software latency when combined with linux-rt or rtkit. Combined with a low-latency codec, one ''should'' receive a relatively low-latency experience.
 
macOS and iOS are known to support AAC. SBC support is presumed to exist. There [https://gist.github.com/dvf/3771e58085568559c429d05ccc339219 used to be] support for AptX.


== Headphones ==
== Headphones ==
Line 57: Line 65:
* Supra-aural - sits on the ear
* Supra-aural - sits on the ear
* circumaural - completely cover the ear
* circumaural - completely cover the ear
Supra-aural and circumaural headphones have the sound reshaped by your auricle. The other two styles feed sound more or less directly into the ear canal. This difference is important for deciding on what kind of HRTF to use.


Terminology used for comparing headphones
Terminology used for comparing headphones
* Noise Cancelling
* Noise Cancelling
** active
** active: the headphone samples outside noise in real time and emits the opposite soundwave (for some frequencies).
** passive
** passive: would be more "blocking" than "cancelling" -- think about an earmuff.
 
* Frequency response - The range of frequencies the headphones can reproduce
* Frequency response - The range of frequencies the headphones can reproduce
* Impedance - Doesn't mean much by itself, but in general, impedence should be matched across a system.  
* Impedance - Doesn't mean much by itself, but in general, impedence should be matched across a system.  
* SPL@1kHz, 1V rms - [http://en.wikipedia.org/wiki/Sound_pressure_level#SPL_in_audio_equipment Sound Pressure Level]. How efficient the unit converts electrical energy to sound energy.
* SPL@1kHz, 1V rms - [http://en.wikipedia.org/wiki/Sound_pressure_level#SPL_in_audio_equipment Sound Pressure Level]. How efficient the unit converts electrical energy to sound energy.
* Neodymium - The magnet of choice for high end headphones.


* Neodymium - The magnet of choice for high end headphones.
Popular Headphones
Popular Headphones
* Sub $30
* Sub $30

Latest revision as of 03:57, 6 August 2024

Bluetooth

Bluetooth has two unusual requirements: codec complexity and latency. Complexity (bitrate too, to an extent) decides battery life, but with the codec doing less work, it's not usual to see bitrate/quality trades way worse than conventional codecs.

A2DP

Advanced Audio Distribution Profile (A2DP) is the traditional music profile.

Standard baseline codecs:

  • Sub Band Codec (SBC) – okay, not great

Standard optional codecs:

  • MPEG-1,2 Audio: = MP3, almost never used
  • AAC: relatively good decode support, transparency possible at bluetooth bitrates, but latency can be an issue
  • ATRAC: never used

Vendor extension codecs:

  • AptX, LDAC, LLDC: in general lower complexity but higher bitrate (still within BT limits) than AAC, transparency possible; AptX and LDAC has wide support
  • FastStream: Qualcomm's bidirectional SBC variant, providing a mono back channel
  • Opus 0.5: PipeWire's little experiment with nearly unlimited channels in either direction. Zero hardware support.
  • Opus Android: The Android 13 approach to adding Opus support. Stereo only, could be bidirectional? (check a2dp_vendor_opus_constants.h!) Supported by Pixel headphones.

Bitrate is limited by bluetooth link. For all relevant codecs, there is a maximum limit of 2 channels: this is a headphone protocol, not a speaker protocol. Microphone-back channel is not available except in FastStream and AptX LL duplex.

Sub Band Codec

  • Sampling Frequency - 16000, 32000, 44100, 48000 (some are optional, see references)
  • Channel Mode - mono, dual channel, stereo, joint stereo

The bitrate used for CD-rate (16-bit, 44.1 KHz) audio is 229 kbps and 328 kbps for middle and high quality, respectively.

Reference: BLUETOOTH Advanced Audio Distribution Profile 1.0

HSP/HFP

This is the mode with mono input and output, both at voice sample rates. Only very crude encodings (CVSD, PCM, optionally SBC 16KHz as the higher-quality thing) are supported, so do not expect audio quality.

LE Audio

This is the new, rewritten general-purpose bluetooth audio stack. This mode allows bidirectional audio of various channel configurations. Battery use is allegedly lower than A2DP.

LC3

See also: Wikipedia:LC3 (codec)

LC3 is the baseline LE Audio codec. It uses some of the same ideas as Opus CELT, but comes with some new patented techniques and runs at extremely low complexity.

  • It's allegedly "better than Opus" with respect to error tolerance in speech environments. Except the test is done with speech samples in the non-speech, non-FEC mode of Opus (CELT), at minimum complexity (effort), and an old version at that.
  • No joint stereo is available. The rationale given is that this allows True Wireless Stereo (TWS) to work with the audio source transmitting direct to each headphone, without needing an intermediate decode.
  • LC3plus, LC3's "high-res" cousin available over A2DP, is worse than Apple and Android (FDK) AAC at 144 kbps. The Japan Audio Society nevertheless thinks that's enough for a "Hi-Res AUDIO WIRELESS" sticker.

In any case, it's much better than SBC and retains the low complexity character. When given more bits, such as with the 96*2 and 124*2 standard profiles, it can be very acceptable. Google's open source liblc3 implementation is written to the word of the BT spec.

Operating systems

Bluetooth codec support is not great on Windows. Windows 10 has SBC and AptX. Windows 11 introduces AAC as a better-than-SBC fallback on non-Qualcomm devices; it also introduces LE Audio support. There is no support for any codec variant such as AptX-HD. You can use a third-party driver ($5.99 trialware) that does A2DP its own way to get the better codecs.

With PipeWire and BlueZ 5, Linux has support for many codecs: AptX (including LL and HD), LDAC, FastStream, both versions of Opus, LC3plus, and SBC XQ. The modern, PipeWire-based Linux audio stack can have very low software latency when combined with linux-rt or rtkit. Combined with a low-latency codec, one should receive a relatively low-latency experience.

macOS and iOS are known to support AAC. SBC support is presumed to exist. There used to be support for AptX.

Headphones

Some Styles (smallest to largest)

  • In the ear - outputs directly into the ear canal
  • Earbuds - sits in the outer ear
  • Supra-aural - sits on the ear
  • circumaural - completely cover the ear

Supra-aural and circumaural headphones have the sound reshaped by your auricle. The other two styles feed sound more or less directly into the ear canal. This difference is important for deciding on what kind of HRTF to use.

Terminology used for comparing headphones

  • Noise Cancelling
    • active: the headphone samples outside noise in real time and emits the opposite soundwave (for some frequencies).
    • passive: would be more "blocking" than "cancelling" -- think about an earmuff.
  • Frequency response - The range of frequencies the headphones can reproduce
  • Impedance - Doesn't mean much by itself, but in general, impedence should be matched across a system.
  • SPL@1kHz, 1V rms - Sound Pressure Level. How efficient the unit converts electrical energy to sound energy.
  • Neodymium - The magnet of choice for high end headphones.

Popular Headphones

  • Sub $30
  • Sub $100
  • $100 - $300
  • $300+