User Tools

Site Tools


alsa

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
alsa [2026-11-22 21:47 UTC (5 days ago)] – formattinhg fix qkbalsa [2026-11-22 22:40 UTC (5 days ago)] (current) – remove some useless AI text / verbosity jazzy
Line 10: Line 10:
  
   * PIC32 key ''%%0x07E0%%'' (''%%ValueWrite%%'', type ''%%0x04%%''): ''%%1%%'' = amp on, ''%%0%%'' = amp off.   * PIC32 key ''%%0x07E0%%'' (''%%ValueWrite%%'', type ''%%0x04%%''): ''%%1%%'' = amp on, ''%%0%%'' = amp off.
-  * One master gate for both channels. 
   * It reads back with ''%%ValueRead%%'', so the state can be queried.   * It reads back with ''%%ValueRead%%'', so the state can be queried.
-  * It latches until the PIC32 resets at the next power-off. Nothing persistent is written.+  * It remains in this state until the PIC32 resets at the next power-off.
  
-With the amp off, ALSA, the codec, the mixer, and the clocks can all be perfectly 
-configured and the speaker is still silent. That is why playback needed nx in 
-practice: nx switches the amp on once at startup through 
-''%%NxPaCtrl%%''/''%%NxPaMobil2PicDev%%''. 
  
 ===== Turning the amp on ===== ===== Turning the amp on =====
  
-The stock tool does it with:+You can toggle the amp using NxExe:
  
 <code> <code>
Line 27: Line 22:
 </code> </code>
  
-That command toggles the amp. The state persists until the PIC32 loses power, so +That command toggles the amplifier. The state persists until the PIC32 loses power, so 
-blindly toggling on boot can turn it off if it was already on. Read the state +blindly toggling after a reboot can turn it off if it was already on.
-first, or set it explicitly.+
  
 To set the amp explicitly, write the PIC32 frame directly. These are IPP frames To set the amp explicitly, write the PIC32 frame directly. These are IPP frames
Line 63: Line 57:
 </code> </code>
  
-Play a file, not a pipe. A file plays:+Playing a file:
  
 <code> <code>
 aplay /tmp/tone.wav aplay /tmp/tone.wav
-</code> 
- 
-Piping into ''%%aplay%%'' from stdin is silent on this device: 
- 
-<code> 
-cat tone.wav | aplay -q - 
 </code> </code>
  
Line 80: Line 68:
 amixer -c 0 sset PCM 65% amixer -c 0 sset PCM 65%
 </code> </code>
- 
-The old ''%%amixer sset PCM 144%%'' command sets a raw level. Treat it as a high level, 
-not a percentage. 
  
 A complete manual sequence: A complete manual sequence:
Line 98: Line 83:
 ===== Why nx seemed to be required ===== ===== Why nx seemed to be required =====
  
-nx turns the speaker amp on once at startup and never turns it off. The PIC32+nx turned the speaker amp on once at startup and never turns it off. The PIC32
 keeps that state until it loses power. keeps that state until it loses power.
  
-The codec is not the gate. Its registers, DAPM, GPIO, clocks, AUDMUX, and SSI1+The codec can be configured fine without the amp but the speakers will remain silent. Its registers, DAPM, GPIO, clocks, AUDMUX, and SSI1
 can all match while the speaker is silent. The amp is a separate PIC32 value on can all match while the speaker is silent. The amp is a separate PIC32 value on
 ''%%ttymxc2%%'', after the codec. nx does not touch any extra ALSA mixer or codec ''%%ttymxc2%%'', after the codec. nx does not touch any extra ALSA mixer or codec
 control. It writes ''%%0x07E0 = 1%%'' once near boot. control. It writes ''%%0x07E0 = 1%%'' once near boot.
  
-Set ''%%0x07E0%%'' to 1 and the speaker works from a cold boot with no nx. It stays on 
-until the PIC32 resets, so it only needs setting once per power cycle. 
  
 ===== Notes (maybe outdated) ===== ===== Notes (maybe outdated) =====
alsa.txt · Last modified: by jazzy