Speaker — what it is, types and how it works in mobile devices

Author: IT Sectr Published: 2026-03-24 Reading time: 10 min

A speaker in mobile devices is an electrodynamic or piezoelectric transducer that converts audio signals into sound waves with frequencies from 200 Hz (bass) to 20 kHz (high frequencies). Modern smartphones use a combination of a main speaker on the bottom edge and an earpiece on the top edge for stereo sound. According to Frost & Sullivan, 2025, the average output power of a built-in smartphone speaker is 1–2 W, with peak power up to 5 W for flagship models.

Key Takeaways

  • Electrodynamic speaker — a coil in a magnetic field moves the diaphragm, creating sound waves; the main type for mobile devices due to high volume and wide frequency range
  • Earpiece vs main speaker — the earpiece is optimized for mid frequencies (200–3400 Hz), the main speaker for full range with emphasis on low frequencies
  • Impedance 4–8 Ω — the resistance of a smartphone speaker coil; low impedance allows extracting more power at 3.7 V (lithium-ion battery)
  • AudioTrack (Android) and AVAudioPlayer (iOS) — the main APIs for playing sound through a smartphone speaker from an application
  • RMS power 1 W — typical power of a built-in speaker at medium volume; peak 2–5 W is achieved through thermal inertia of the winding

What is a Speaker?

A speaker is an electroacoustic transducer that converts an electrical audio frequency signal into mechanical vibrations of a diaphragm, which create sound waves in the air. The main components are: a permanent magnet, a voice coil, a diaphragm (membrane), and a surround. The current in the coil creates a magnetic field that interacts with the permanent magnet’s field, moving the coil together with the diaphragm.

In mobile devices, the size limitation of the speaker is a key reproduction challenge. The diaphragm diameter of flagship smartphones (iPhone, Galaxy) is 12–16 mm for the main speaker. According to acoustic laws, low frequencies require a large volume of displaced air — a small diaphragm cannot reproduce bass below 200–300 Hz. Therefore, built-in smartphone speakers predominantly produce mid and high frequencies.

To improve the low-frequency range, manufacturers use acoustic chambers (resonant chambers) in the smartphone body. The speaker diaphragm forces air into a plastic chamber with a volume of 0.5–1.5 ml, which works as a phase inverter — shifting the low-frequency cutoff to 150–200 Hz. Without a chamber, the lower cutoff would be 400–500 Hz.

Electrodynamic vs Piezoelectric Speaker

Most speakers in smartphones are of the electrodynamic type. However, in some scenarios (earpiece, ultrasonic unlocking) piezoelectric transducers are used. They utilize the inverse piezoelectric effect: applying voltage changes the crystal size, which vibrates and creates sound.

ParameterElectrodynamicPiezoelectric
Frequency Range150–20000 Hz1000–40000 Hz
Power (RMS)0.5–2.0 W0.1–0.5 W
Housing Thickness3–5 mm (with coil)0.5–1.5 mm
SPL at 1 W78–85 dB65–75 dB
THD (typical)< 1% (0.1–0.5 W)< 3% (at resonance)
ApplicationMain speaker, earpieceEarpiece (Crystal Speaker), rangefinder

Piezoelectric speakers are thinner and save space for the battery, but are inferior in volume and sound quality. For example, the Crystal Speaker in Xperia series phones uses the glass screen as a diaphragm — sound is created by the vibration of the glass itself through a piezoelectric element, without a traditional coil and magnet.

Speaker Configuration: Earpiece, Main Speaker, Tweeter

A smartphone’s audio system configuration includes 2 to 4 transducers. The earpiece is located at the top above the screen — its task is to transmit the caller’s voice. The earpiece is optimized for mid frequencies (200–3400 Hz) and typically has a power of 0.1–0.3 W for a comfortable volume of 60–70 dB at the ear.

The main speaker is located on the bottom edge or under the display (if the screen is curved). It is the most powerful speaker in the smartphone with RMS up to 2 W and a frequency range of 150–18000 Hz. In a stereo configuration, the main speaker handles the right channel, while the earpiece handles the left. Some flagships add a third transducer — a tweeter for high frequencies (5–20 kHz) with separate amplification.

Stereo tuning is performed by the codec and Class D amplifier. The manufacturer (Apple, Samsung, Xiaomi) configures the crossover and equalizer for the specific speaker characteristics. The developer cannot change this setting programmatically — only enable or disable system sound processing through system parameters.

Playback Example Using AudioTrack on Android

kotlin
fun playTone(frequency: Int) {
    val sampleRate = 44100
    val duration = 1.0
    val numSamples = (sampleRate * duration).toInt()
    val samples = ShortArray(numSamples)

    for (i in 0 until numSamples) {
        val t = i.toDouble() / sampleRate
        samples[i] = (Short.MAX_VALUE * sin(
            2.0 * Math.PI * frequency * t
        )).toShort()
    }

    val track = AudioTrack(
        AudioManager.STREAM_MUSIC,
        sampleRate,
        AudioFormat.CHANNEL_OUT_MONO,
        AudioFormat.ENCODING_PCM_16BIT,
        numSamples * 2,
        AudioTrack.MODE_STATIC
    )
    track.write(samples, 0, numSamples)
    track.play()
}

The code generates a sine wave signal of a given frequency (PCM 16-bit, mono) and plays it through AudioTrack in the STREAM_MUSIC stream. AudioTrack is a low-level API for real-time audio generation: the application gets direct access to the audio buffer and controls playback with a latency of less than 50 ms.

Main Parameters: Impedance, Sensitivity, Frequency Range

Impedance of a speaker is the total electrical resistance of the coil, measured in ohms at 1 kHz. The typical value for mobile speakers is 4 and 8 ohms. Ohm’s Law determines current: at a fixed voltage of 3.7 V, a 4 Ω speaker draws 2 times more current than an 8 Ω speaker, producing greater volume. However, low impedance increases heating of the Class D amplifier.

Sensitivity (SPL, Sound Pressure Level) is the sound pressure at a distance of 1 meter when 1 W of power is applied. Measured in dB/W/m. The typical value for a smartphone’s main speaker is 78–85 dB/W/m. A 3 dB difference corresponds to a doubling of electrical power. Sensitivity is determined by diaphragm design, materials, and acoustic chamber volume.

Frequency range is the interval of frequencies in which the speaker reproduces a signal with non-uniformity of no more than ±10 dB. For a built-in smartphone speaker — 200–18000 Hz. The lower limit is determined by diaphragm size and chamber volume, the upper limit by coil inertia and moving system mass.

According to DXOMARK Audio (2025), flagship smartphones achieve SPL of 75–82 dB in loudness tests with THD below 1% at 70% volume. The leaders in speaker sound quality remain the iPhone 16 Pro Max, Samsung Galaxy S25 Ultra, and Xiaomi 15 Pro.

Audio Playback: Android AudioTrack and iOS AVAudioPlayer

AudioTrack (Android) is an API for sending PCM buffers directly to an audio stream. The application manages the buffer content, allowing tone generation, network audio streaming, or mixing multiple sources. AudioTrack operates in two modes: MODE_STATIC (a single buffer is played once) and MODE_STREAM (buffers are transmitted continuously via write()).

AVAudioPlayer (iOS) is a high-level API for playing files in MP3, AAC, WAV, and other formats. For low-level access to the audio buffer, AVAudioEngine with a player node is used. AVAudioPlayer does not require codec parsing — the system automatically decodes the file format to PCM via AudioToolbox.

For latency-sensitive applications (games, synthesizers), iOS uses AVAudioSession with the .playback category and .withAudioWithOthers option for mixing with background music. On Android — AudioTrack with PERFORMANCE_MODE_LOW_LATENCY (Android 8+) to reduce latency to 10–20 ms.

Playback Example in Swift (iOS)

swift
import AVFoundation

func playSound(name: String) {
    guard let url = Bundle.main.url(
        forResource: name, withExtension: "mp3"
    ) else { return }

    let session = AVAudioSession.sharedInstance()
    try? session.setCategory(.playback)

    let player = try? AVAudioPlayer(contentsOf: url)
    player?.volume = 0.8
    player?.play()
}

The code finds the file in the bundle, activates the audio session with the .playback category (playback even in silent mode), and starts the player. AVAudioPlayer handles decoding and playback automatically — the developer only needs to specify the URL and set the volume.

Sound Enhancement: Equalizer, Virtual Surround, DAC

Modern smartphones include software sound enhancement algorithms at the codec or DSP level. An equalizer adjusts the amplitude of frequency bands. Android provides the Equalizer class from the AudioEffect API with presets (Rock, Classical, Bass Boost) and custom bands. iOS — MPVolumeView with a system equalizer only for the Music app.

Virtual Surround processes the stereo signal through HRTF filters (Head-Related Transfer Function), simulating the placement of sound sources around the listener. Implemented through IAudioProcessingObject (Android) or AVAudioUnitReverb / AVAudioUnitEQ (iOS). For games and videos, Virtual Surround improves spatial perception but reduces source localization accuracy.

A DAC (Digital-to-Analog Converter) converts the digital PCM stream into an analog signal for the speaker. Most SoCs (Snapdragon, A17) have a built-in DAC with a frequency of up to 384 kHz and a bit depth of up to 32 bits. Flagship models (LG G8 with ESS Sabre, Xiaomi 15 with AKM) use a separate Hi-Fi Class DAC with SNR up to 132 dB and DSD support — for wired headphones, not for built-in speakers.

Frequently Asked Questions

Why do built-in smartphone speakers reproduce bass poorly?

Low frequencies require displacing a large volume of air — the diaphragm area of a small speaker (12–16 mm) is insufficient to create low-frequency pressure. The lower limit of most smartphones is 150–200 Hz. For quality bass reproduction, a separate subwoofer or headphones with a driver diameter of 40+ mm are needed.

What is an earpiece and how does it differ from a main speaker?

An earpiece is a low-power speaker (0.1–0.3 W) on the top edge of a smartphone for speech transmission. It is optimized for the frequency range of 300–3400 Hz. A main speaker is more powerful (1–2 W), located on the bottom edge for music, video, and speakerphone, with a full range of 150–18000 Hz.

How to programmatically control speaker volume in an application?

On Android — AudioManager.setStreamVolume(STREAM_MUSIC, level, 0) to change system volume. On iOS — AVAudioSession.setActive(true) with outputVolume setting (only for your own player). Both platforms allow setting the relative player volume through the volume property.

Which API provides the lowest latency for sound?

On Android 8+ — AudioTrack with PERFORMANCE_MODE_LOW_LATENCY + .playback configuration in AAudio. Latency is 10–20 ms. On iOS — AVAudioEngine with AVAudioSessionCategory .playback and the .withAudioWithOthers option provides 5–15 ms latency. For games and synthesizers, OpenAL (iOS) or Oboe (Android) are recommended.

What is speaker THD and what value is considered acceptable?

THD (Total Harmonic Distortion) is the total harmonic distortion coefficient, showing how much the speaker’s non-linear distortion differs from the original signal. For a built-in smartphone speaker, THD below 1% at 70% volume is excellent. At THD of 5–10%, the sound becomes raspy and distorted.

Summary

  • Smartphone speaker — an electrodynamic transducer with a power of 1–2 W and a diaphragm diameter of 12–16 mm
  • Configuration includes an earpiece (top, 300–3400 Hz) and a main speaker (bottom, 150–18000 Hz) for stereo sound
  • Piezoelectric speakers are used as Crystal Speakers — display vibration through a piezoelectric element without a magnet
  • Acoustic chamber (0.5–1.5 ml) lowers the cutoff frequency to 150–200 Hz, improving bass
  • Android AudioTrack — low-level API with 10–50 ms latency for audio generation and streaming
  • iOS AVAudioPlayer — high-level player with automatic audio file decoding
  • Equalizer, Virtual Surround, and DAC — software and hardware sound enhancements at the OS level

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also