This commit is contained in:
Correl Roush 2023-06-28 00:07:17 -04:00
parent 6588188886
commit 8cf5784f1c
4 changed files with 46 additions and 3 deletions

View file

@ -39,13 +39,24 @@
- VCC - VCC
- GND - GND
** Digital Analog Converter (PCM5102) ** Digital Analog Converter (PCM5102)
*** Pins Communicates via the [[id:8f2e7b85-ede4-486b-ae5e-e36dd568552a][I2S]] protocol.
*** Pins *** Pins
- BCK - BCK
- DIN - DIN
- LRCK - LRCK
- VCC - VCC
- GND - GND
#+begin_comment
sck_pin = Pin(14) # Serial clock output
ws_pin = Pin(13) # Word clock output
sd_pin = Pin(12) # Serial data output
#+end_comment
| DAC Pin | I2S Counterpart | Pin |
|---------+-----------------------------------------------------------+------|
| LRCK | Word Clock (Word Select (WS) / Left-Right Clock (LRCLK))) | IO27 |
| DIN | Multiplexed Data Line (Serial Data (SD)) | IO26 |
| BCK | Bit Clock (Continuous Serial Clock / SCK) | IO25 |
| SCK | Master Clock (not part of the I2S standard) | GND |
*** Wiring notes *** Wiring notes
[[https://raspberrypi.stackexchange.com/a/94951/154943]] [[https://raspberrypi.stackexchange.com/a/94951/154943]]
@ -61,7 +72,7 @@ On the back (non-component side) there are 4 sets of 3 pads for the 4 functions:
- XSMT :: Soft mute control(1): Soft mute (Low) / soft un-mute (High) - XSMT :: Soft mute control(1): Soft mute (Low) / soft un-mute (High)
- FMT :: Audio format selection : I2S (Low) / Left justified (High) - FMT :: Audio format selection : I2S (Low) / Left justified (High)
The centre pad is connected to the corresponding pin. Each of these function pads may be bridged with solder either high or low (or the pins connected to +3.3V / 0V). (My board is supplied with 1, 2 & 4 bridged low and 3 bridged high, i.e. normal latency filter, 44.1kHz de-emphasis disabled, soft-mute not asserted, I2S audio format.) The centre pad is connected to the corresponding pin. Each of these function pads may be bridged with solder either high or low (or the pins connected to +3.3V / 0V). (My board is supplied with 1, 2 & 4bridged low and 3 bridged high, i.e. normal latency filter, 44.1kHz de-emphasis disabled, soft-mute not asserted, I2S audio format.)
The normal filter is an FIR with good response, delaying the signal by approx. 500us (at 44.1 kHz) which should be fine. The fast filter is an IIR with slightly poorer response and delays the signal approx. 80us. Very few (if any) audio sources have pre-emphasis applied so DEMP should be low. The XSMT pin would allow muting of the output via a GPI (if the solder bridge was removed). Raspberry Pi supports I2S bitstream so FMT should be low. The normal filter is an FIR with good response, delaying the signal by approx. 500us (at 44.1 kHz) which should be fine. The fast filter is an IIR with slightly poorer response and delays the signal approx. 80us. Very few (if any) audio sources have pre-emphasis applied so DEMP should be low. The XSMT pin would allow muting of the output via a GPI (if the solder bridge was removed). Raspberry Pi supports I2S bitstream so FMT should be low.

View file

@ -5,5 +5,5 @@
#+begin_src sh :results silent #+begin_src sh :results silent
pactl load-module module-null-sink sink_name=Network sink_properties=device.description=Network pactl load-module module-null-sink sink_name=Network sink_properties=device.description=Network
pactl load-module module-simple-protocol-tcp rate=48000 format=s16le channels=2 record=true port=8001 source=null-sink.monitor pactl load-module module-simple-protocol-tcp rate=22050 format=s16le channels=2 record=true port=8001 source=null-sink.monitor
#+end_src #+end_src

5
20230626171739-i2s.org Normal file
View file

@ -0,0 +1,5 @@
:PROPERTIES:
:ID: 8f2e7b85-ede4-486b-ae5e-e36dd568552a
:END:
#+title: I2S
Inter-IC Sound Bus Protocol

27
20230627235323-xmage.org Normal file
View file

@ -0,0 +1,27 @@
:PROPERTIES:
:ID: 01663abf-a6c3-434d-a710-bcbcddfdcc1e
:END:
#+title: XMage
An open-source implementation of [[id:d5efa5bd-dac9-4ef5-b352-a2b794a37bd0][Magic: The Gathering]].
* Developing
** Requirements
- JDK 1.8+
- Maven
Ensure the correct JDK is set:
: export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
To build, use:
: mvn clean install -DskipTests
To run the server:
#+begin_src sh
cd Mage.Server
mvn exec:java -Dexec.mainClass=mage.server.Main
#+end_src
To run the client:
#+begin_src sh
cd Mage.Client
mvn exec:java -Dexec.mainClass=mage.client.MageFrame
#+end_src