I. Hardware Requirements
- Audio Output: Generic USB DAC (USB Audio Class 1 compatible).
- Power Supply: External 5V DC source (Battery or regulated wall power).
- Wiring: USB "Y-cable" configuration or custom solder job.
- Logic: Common Ground (GND) between Kindle and 5V source.
II. Hardware Implementation (The Power/Ground Hack)
- VCC (5V): Connect the external 5V source directly to the DAC's VCC pin. Do not connect this to the Kindle's VCC pin.
- GND (Ground): Solder a common ground connecting the Kindle’s USB GND (Pin 5), the external 5V source GND, and the DAC’s GND.
- Data (D+/D-): Connect Kindle Pin 2 (D-) and Pin 3 (D+) directly to the DAC’s data pads.
- ID Pin (Host Mode): To trigger Host Mode, bridge Kindle Pin 4 (ID) to GND (Pin 5) using a 10kΩ resistor. If the trace is missing on the PW2 board, Host Mode must be forced via the
musbregisters in software.
III. Software Implementation (The Driver Stack)
- Environment: Set up a Linux VM with an
arm-linux-gnueabitoolchain. - Kernel Modules:
- Download the Kindle PW2 GPL source (e.g., version 5.4.x).
- Configure the kernel to build modules (
m) for:CONFIG_SND_USB_AUDIOCONFIG_SND_PCMCONFIG_SND_HWDEPCONFIG_SND
make modulesand extract the.kofiles.
- ALSA User-land:
- Cross-compile
alsa-libandalsa-utils. - The primary binary needed is
aplayfor raw playback oramixerfor volume control.
- Cross-compile
- Media Player: Cross-compile
mpg123ormplayerfor MP3/FLAC decoding.
IV. KUAL Integration (The GUI)
Create a new extension directory:
/extensions/usbaudio/.- Initialization Script (
bin/load_audio.sh): - KUAL Menu (
menu.json): - Playback Script (
bin/play.sh):
V. Execution Flow
- Connect the powered DAC to the Kindle.
- Launch KUAL from the Kindle home screen.
- Select "Enable USB Audio" (Triggers the
insmodand Host Mode flip). - Verify device detection via SSH using
lsusbandcat /proc/asound/cards. - Select "Play Music" via KUAL to initiate the binary playback.
No comments:
Post a Comment