diff options
author | Dana Conrad <dconrad@fastmail.com> | 2023-11-21 19:28:51 -0600 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2024-01-02 06:51:07 -0500 |
commit | a3fe07ff128e521051aee8bc91add071724d6538 (patch) | |
tree | 9e3eb34908a4571f85686877085d9f5b200d1c2a /firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h | |
parent | 161c861153f67c2436affc11860ed932a0d21c30 (diff) | |
download | rockbox-a3fe07ff128e521051aee8bc91add071724d6538.tar.gz rockbox-a3fe07ff128e521051aee8bc91add071724d6538.zip |
ErosQ New Revision HW volume
Add HW volume control via ES9018K2M, and reorganize
eros_qn_codec.c/.h, audiohw-erosqnative.c.
This automatically detects the presence of the new DAC and
uses its hardware volume scaling. If not present, use same
SWVOL we have been using so far.
Add debug menu readout of SWVOL/I2C result.
Break out es9018k2m stuff into its own file so that
maybe it can be useful to other ports.
Note that we may need to get smarter about detecting the DAC
type if/when another model emerges.
Change-Id: I586a1cf7f150dd6b4e221157859825952840af56
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h b/firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h index 3318a39786..72052c261f 100644 --- a/firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h +++ b/firmware/target/mips/ingenic_x1000/erosqnative/gpio-target.h | |||
@@ -15,17 +15,21 @@ | |||
15 | 15 | ||
16 | /* ---------------------------------------------- */ | 16 | /* ---------------------------------------------- */ |
17 | 17 | ||
18 | |||
18 | /* Name Port Pins Function */ | 19 | /* Name Port Pins Function */ |
19 | DEFINE_PINGROUP(LCD_DATA, GPIO_A, 0xffff << 0, GPIOF_DEVICE(1)) | 20 | DEFINE_PINGROUP(LCD_DATA, GPIO_A, 0xffff << 0, GPIOF_DEVICE(1)) |
20 | DEFINE_PINGROUP(LCD_CONTROL, GPIO_B, 0x1a << 16, GPIOF_DEVICE(1)) | 21 | DEFINE_PINGROUP(LCD_CONTROL, GPIO_B, 0x1a << 16, GPIOF_DEVICE(1)) |
21 | DEFINE_PINGROUP(MSC0, GPIO_A, 0x3f << 20, GPIOF_DEVICE(1)) | 22 | DEFINE_PINGROUP(MSC0, GPIO_A, 0x3f << 20, GPIOF_DEVICE(1)) |
22 | DEFINE_PINGROUP(SFC, GPIO_A, 0x3f << 26, GPIOF_DEVICE(1)) | 23 | DEFINE_PINGROUP(SFC, GPIO_A, 0x3f << 26, GPIOF_DEVICE(1)) |
23 | DEFINE_PINGROUP(I2S, GPIO_B, 0x1f << 0, GPIOF_DEVICE(1)) | 24 | DEFINE_PINGROUP(I2S, GPIO_B, 0x1f << 0, GPIOF_DEVICE(1)) |
25 | DEFINE_PINGROUP(I2C1, GPIO_C, 3 << 26, GPIOF_DEVICE(0)) | ||
24 | DEFINE_PINGROUP(I2C2, GPIO_D, 3 << 0, GPIOF_DEVICE(1)) | 26 | DEFINE_PINGROUP(I2C2, GPIO_D, 3 << 0, GPIOF_DEVICE(1)) |
25 | 27 | ||
26 | /* Name Pin Function */ | 28 | /* Name Pin Function */ |
27 | /* mute DAC: 0 - mute, 1 - play */ | 29 | /* mute DAC: 0 - mute, 1 - play */ |
28 | DEFINE_GPIO(DAC_XMIT, GPIO_PB(12), GPIOF_OUTPUT(0)) | 30 | /* Note: This seems to actually be power to the DAC in general, |
31 | * at least on the ES9018K2M devices. Was "DAC_XMIT". */ | ||
32 | DEFINE_GPIO(DAC_PWR, GPIO_PB(12), GPIOF_OUTPUT(0)) | ||
29 | 33 | ||
30 | /* mute HP amp: 0 - mute, 1 - play */ | 34 | /* mute HP amp: 0 - mute, 1 - play */ |
31 | DEFINE_GPIO(HPAMP_SHDN, GPIO_PB(8), GPIOF_OUTPUT(0)) | 35 | DEFINE_GPIO(HPAMP_SHDN, GPIO_PB(8), GPIOF_OUTPUT(0)) |