====== I2S ====== ===== Introduction ===== This page introduces the usage of I2S bus on [[products:sbc:common:applications:gpio:40pin-header|40-Pin Header]]. ===== I2S Information ===== | ^ PIN ^ GPIO Name ^ GPIO Number ^ ^ VIM3/3L | 29 (BCK) | PIN.A1 | 477 | | ::: | 31 (DATA) | PIN.A3 | 479 | | ::: | 32 (LRCK) | PIN.A2 | 478 | | ::: | 28 (GND) | GND | | | ::: | 1 (VCC) | 5V | | ^ VIM4 | 29 (BCK) | PIN.T1 | 447 | | ::: | 31 (DATA) | PIN.T3 | 449 | | ::: | 32 (LRCK) | PIN.T2 | 448 | | ::: | 28 (GND) | GND | | | ::: | 1 (VCC) | 5V | | ^ VIM1S | 29 (BCK) | PIN.Z1 | 499 | | ::: | 31 (DATA) | PIN.Z2 | 500 | | ::: | 32 (LRCK) | PIN.Z0 | 498 | | ::: | 28 (GND) | GND | | | ::: | 1 (VCC) | 5V | | ===== Enable I2S ===== In order to use the I2S, you need to enable the I2S function via [[products:sbc:common:configurations:device-tree-overlay|Device Tree Overlay]]. To enable ''I2S'', you need to add ''i2s'' to node ''fdt_overlays'' if it doesn't exist. For VIM3, edit ''/boot/dtb/amlogic/kvim3.dtb.overlay.env'' to add i2s node to ''fdt_overlays'' node if it doesn't exist. For VIM3L, edit ''/boot/dtb/amlogic/kvim3l.dtb.overlay.env'' to add i2s node to ''fdt_overlays'' node if it doesn't exist. e.g. ```shell fdt_overlays=i2s ``` After reboot, you can connect your i2s device to corresponding pins. Edit ''/boot/dtb/amlogic/kvim4.dtb.overlay.env'' to add i2s node to ''fdt_overlays'' node if it doesn't exist. e.g. To enable ''I2S'', you need to add ''i2s'' to node ''fdt_overlays'' if it doesn't exist. ```shell fdt_overlays=i2s ``` After reboot, you can connect your i2s device to corresponding pins. Edit ''/boot/dtb/amlogic/kvim1s.dtb.overlay.env'' to add i2s node to ''fdt_overlays'' node if it doesn't exist. e.g. To enable ''I2S'', you need to add ''i2s'' to node ''fdt_overlays'' if it doesn't exist. ```shell fdt_overlays=i2s ``` After reboot, you can connect your i2s device to corresponding pins. ===== I2S Usage ===== ``` shell $ aplay -l # find your i2s card and play audio using it $ aplay -D hw:0,0 .wav # replace 0,0 with i2s interface (card,device) ```