summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/audio/erosqlinux_codec.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-17erosq: Tweak volume scale to be approximately correctDana Conrad1-5/+5
Tested on eros q, everything measured from line out, open circuit. - volume steps were approximately double the dB they were labelled as, so "-2 dB" would result in a change of about -4 dB from maximum (0, +6.2dBV) - maximum volume defining the line out volume only changed every 10 values, and then was not close to correct- "-10 dB" resulted in -2.5 dB from maximum This gets the volume dB approximately correct, and maximum volume correctly sets the line out volume. I was unable to get odd values in the max volume to work, so set the step size to 2 instead of one. For "consumer level" (-10dBV), set to -16. For "Pro level" (+4dBu -> ~1.8dBV), set to -4. Change-Id: I898b85d768153579a893b23551019af88f865d21
2021-04-14hosted: Don't open alsa control device directlySolomon Peachy1-23/+7
It was just being used as a proxy "yeah, we called hw_init()" so just use a flag for that directly. affects rocker, erosq, xduoo x3ii/x20, and fiiom3klinux Change-Id: I14bd9f8d91f1d6cc8de0982a7426e2a103c6bfce
2021-04-10misc: Only include rbpaths.h and string-extra.h in places that need itSolomon Peachy1-3/+0
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h) Build-tested on rocker, erosq, mini2g, nano2g, xduoox3, clipzip, dx50, and uisim Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-04-08erosq: Switch to 32-bit PCM output, and do volume scaling in driverSolomon Peachy1-8/+11
Should improve audio output quality, especially at lower volumes. Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
2021-04-08ErosQ: fix panic on startup caused by ad55da5fSolomon Peachy1-2/+3
It turns out #include "settings.h" pulls in rbpaths.h which ends up remapping open() to the path-mangling rockbox open(). By defining RB_FILESYSTEM_OS we prevent the remap. My mistake for not testing this before committing! Change-Id: I2978eb7b413693c4cb887b7ac7b2457780db7d25
2021-04-08ErosQ: Set Line Level Output volumeDana Conrad1-4/+10
With a full-scale 440Hz tone, the line out voltage measured approx. 5.8Vpp at the 0 setting. WAY too hot! (9 dBV, in fact) For 0.894Vpp (-10 dBV - consumer devices), -18 appears to be about right for line level signals, but for "pro" equipment a different level may be desired. Therefore, the user to cap the line out level by re-using the global volume limit setting. Change-Id: I0d1d6482ea95537e9a2d00884eaee2713771c614
2020-10-31nwz/alsa: various improvementsAmaury Pouly1-1/+1
Also audiohw driver to specific device name, rewrite alsa controls code to cache more data, thus making the code easier and use less stack. Avoid using short/long in pcm alsa code since it's the wrong size on 64-bit (simulator for example) Change-Id: Ibc1ec44396e37b6cbdedbcf37300878638e5d2d3
2020-10-25hosted: Document HW capabilities of audio driversSolomon Peachy1-0/+26
One surprise: X3ii is capable of 384KHz playback Change-Id: I0cc88637c81a21d54979e82b2941fe14de933d4d
2020-10-16hosted: Make sure we don't call mixer/etc controls when we're not readySolomon Peachy1-9/+6
(Might fix the rocker crash-on-shutdown bug) Change-Id: Id375fc5053adef18d7ec812bdba36ee002e706ef
2020-10-12hosted: Fix a corner case in umuting the x3ii and erosqSolomon Peachy1-0/+1
Change-Id: I3ffc3b82c6137bab3f27cd87ccc57c2f03a1d401
2020-10-12hosted: More PCM muting workSolomon Peachy1-5/+8
* Track mute state, only call hw if actual change is needed * Don't unmute in audiohw_postinit() * sample rate tracking fixes * erosq: Don't start up muted Change-Id: I004f787a4b7ea73c16b6ec9818ec29a12c89f46b
2020-10-12Hosted PCM: Rework auto-muting code a bitSolomon Peachy1-2/+5
* If AUDIOHW_MUTE_ON_PAUSE, no meaningful change * Unconditionally unmute on playback start * xduoox3ii: Mute on sample rate change * rocker/xduoo: Stay muted after startup This avoids the nasty "pop" on startup, without doing the full mute-on-pause stuff that causes unacceptable dropouts on the X3ii. Change-Id: I2e3ee0bb8094e288f37a0acada86a80016ce5cac
2020-10-11New port: AIGO EROS Q / EROS KSolomon Peachy1-0/+181
The Q and K have a slightly different case, but the hardware under the shell is completely identical. These models are rebadged versions: * Hifiwalker H2 (== Q) * AGPTek H3 (== K) * Surfans F20 (== K) Other notes: * Significant improvements in the shared Hiby-platform launcher/loader * SD card can theoretically be hot-swapped now * Support external USB mass storage! * Some consolidation of Hiby-platform targets * Some consolidation of plugin keymaps Todo/known issues: * Keymaps need to be gone over properly * Convert to HAVE_SCROLLWHEEL? Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c