The Linux emulator had no working audio output: the speaker endpoint had a
NULL driver (streams returned -ENODEV). This adds an SDL2 audio playback
driver for the output path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
Add oversampling for each target:
- MD-3x0, MD-UV3x0, MD-9600, DM-1701, CS7000: 8 (64 kHz)
- CS7000-PLUS: 6 (48 kHz, LPTIM3 cannot trigger ADC at 64 kHz)
- All other targets default to 1 via #ifndef guard (no oversampling)
Co-authored-by: Ryan Turner <ryan@turnrye.com>
Co-authored-by: Claude <noreply@anthropic.com>
Replace the platform-specific #ifdef chain for micGain in audio_codec.c
with a CONFIG_MIC_GAIN macro defined in each target's hwconfig.h. This
removes code forking in the codec and makes mic gain a per-device
hardware configuration parameter.
Co-authored-by: opencode <noreply@opencode.ai>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
platform_getMicLevel() now samples data from the ADC
configured for the hardware VOX circuit instead of the
microphone input ADC, which has a fixed 1.65V bias and
is unsuitable for checking mic level.
Normalization is performed specific to the characteristics
of the hardware VOX circuit. Values are output between 0-255
to ensure API compatibility.
Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
The CS7000P schematic indicates the hardware VOX circuit
is connected to PC4 on the STM32H7. The pinmap.h file has
been updated to reflect this. The existing assignment of
AIN_VBAT to GPIOC,4 looks like a holdover from another
devices pinmap.
Create a new ADC channel, ADC_VOX_CH
assigned to the ADC matching the GPIO pin that
the VOX circuit is connected to.
Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
This change removes the old copyright header from project sources and
replaces it with a new simplified SPDX-compliant header. Note that files
that were missing the header but reasonably understood to be licensed
according to the root license were not corrected.
Signed-off-by: Ryan Turner <ryan@turnrye.com>
Update meson and cmake config to only include openrtx and platform paths.
Update files to use <..> for system and external libraries, ".." for
project files and new relative paths as necessary.
Did not attempt to fix areas where includes that should be <..> were
previously ".."
Inspired by #96, closes#359.
Acked-by: Silvano Seva <silseva@fastwebnet.it>