Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:drumgizmo_in_a_box [2017/04/11 21:58] devadev:drumgizmo_in_a_box [2017/10/03 21:34] (current) deva
Line 1: Line 1:
 ====== Drumgizmo in a box ====== ====== Drumgizmo in a box ======
 +  * [[dev:dg_in_a_box:diary|Project Diary]]
  
   * [[http://www.ti.com/lit/ds/symlink/cd4517b.pdf|CD4517]] - 64bit shift register   * [[http://www.ti.com/lit/ds/symlink/cd4517b.pdf|CD4517]] - 64bit shift register
  
   * http://www.ti.com/lit/ds/symlink/pcm3168a.pdf   * http://www.ti.com/lit/ds/symlink/pcm3168a.pdf
 +  * http://www.ti.com/product/PCM3168A/description
 +  * [[https://en.wikipedia.org/wiki/ICE_(FPGA)#List_of_iCE_devices| FPGA ice40]]
   * http://elinux.org/RPi_SPI   * http://elinux.org/RPi_SPI
   * http://www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/re46.html   * http://www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/re46.html
   * http://www.st.com/content/ccc/resource/technical/document/datasheet/ef/92/76/6d/bb/c2/4f/f7/DM00037051.pdf/files/DM00037051.pdf/jcr:content/translations/en.DM00037051.pdf   * http://www.st.com/content/ccc/resource/technical/document/datasheet/ef/92/76/6d/bb/c2/4f/f7/DM00037051.pdf/files/DM00037051.pdf/jcr:content/translations/en.DM00037051.pdf
 +  * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/codecs/pcm3168a.c
  
   * http://raspberrypi.stackexchange.com/questions/36169/can-raspberry-pi-function-as-spi-slave   * http://raspberrypi.stackexchange.com/questions/36169/can-raspberry-pi-function-as-spi-slave
- 
  
 Run Pi in SPI slave mode and supply external SPI clock source which will also be used as audio clock rate. It will still act as it's own SPI master but with the external clock. Run Pi in SPI slave mode and supply external SPI clock source which will also be used as audio clock rate. It will still act as it's own SPI master but with the external clock.
Line 23: Line 26:
  
 multiplexer 16bit pr. channel to 2 bit per channel (ie. 2 channels per 32 bit sample) and write 20 channels in total this way where the 16 is the actual output and the last 4 are unused (but can be used for sync) multiplexer 16bit pr. channel to 2 bit per channel (ie. 2 channels per 32 bit sample) and write 20 channels in total this way where the 16 is the actual output and the last 4 are unused (but can be used for sync)
 +
 +^^ Just set least signifiant bit to zero on all channels except last channel
  
  
Line 39: Line 44:
  
 Bring logic analyzer and rpi3 and probes Bring logic analyzer and rpi3 and probes
 +
 +===Synchronisation between SPI/ALSA and FPGA===
 +Each sample uses 1 bit as sync bit.
 +Channel 0 has the bit set to 1, the rest has it set to 0.
 +If the FPGA detects a drift, (pattern doesn't match) it can shift the input one bit and test again - repeating until the pattern matches again.
 +While seeking for a new lock pattern, the output should be muted. When the lock pattern has been found again a number of samples should be processed before the output is unmuted again in order to make sure that we didn't simply find an audio pattern that matched the lock pattern (highly unlikely!)
 +
 +CS on the SPI can be used as a reset mechanism, ie. CS high will reset the FPGA channel counter.
 +CS could be set high for each 1024 samples or similar, key-frame style.
  
 ===Future ideas=== ===Future ideas===
Line 64: Line 78:
 ===Network=== ===Network===
 Set static ip address in ''/etc/networking/interfaces''. Set static ip address in ''/etc/networking/interfaces''.
 +
 +
 +===Tasks===
 +  * DG (+ dependencies) Yocto recipe
 +  * Design print
 +    * Add PCM3168A as kicad component {{:incheck.png}}
 +  * ALSA SPI driver
 +    * Codec configuration (Read datasheet)
 +    * Data transfer
 +  * FPGA / Shift array (SPI to I2S)
dev/drumgizmo_in_a_box.1491940699.txt.gz · Last modified: 2017/04/11 21:58 by deva
Trace:
GNU Free Documentation License 1.3
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0