Commit Graph

11 Commits

Author SHA1 Message Date
Solomon Peachy bc416ff590 misc: Only include rbpaths.h and string-extra.h in places that need it
(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-10 12:08:12 -04:00
Solomon Peachy 1e2a9a651c erosq: Switch to 32-bit PCM output, and do volume scaling in driver
Should improve audio output quality, especially at lower volumes.

Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
2021-04-08 23:58:49 -04:00
Solomon Peachy e17337c9aa ErosQ: fix panic on startup caused by ad55da5f
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-08 21:58:08 -04:00
Dana Conrad ad55da5f87 ErosQ: Set Line Level Output volume
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
2021-04-08 14:37:14 -04:00
Amaury Pouly dd82f13fa1 nwz/alsa: various improvements
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-31 14:16:31 +00:00
Solomon Peachy 4afd1f9aa6 hosted: Document HW capabilities of audio drivers
One surprise:  X3ii is capable of 384KHz playback

Change-Id: I0cc88637c81a21d54979e82b2941fe14de933d4d
2020-10-25 00:42:41 -04:00
Solomon Peachy ce40ef42ff hosted: Make sure we don't call mixer/etc controls when we're not ready
(Might fix the rocker crash-on-shutdown bug)

Change-Id: Id375fc5053adef18d7ec812bdba36ee002e706ef
2020-10-16 20:34:18 -04:00
Solomon Peachy 17244177ee hosted: Fix a corner case in umuting the x3ii and erosq
Change-Id: I3ffc3b82c6137bab3f27cd87ccc57c2f03a1d401
2020-10-12 11:46:05 -04:00
Solomon Peachy 078c34e951 hosted: More PCM muting work
* 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-12 15:33:32 +00:00
Solomon Peachy 141e91ef1f Hosted PCM: Rework auto-muting code a bit
* 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-12 13:40:37 +00:00
Solomon Peachy 2a471e288c New port: AIGO EROS Q / EROS K
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
2020-10-11 16:37:17 -04:00