====== SPDIF ====== ===== Introduction ===== This page introduces the usage of SPDIF bus on [[products:sbc:common:applications:gpio:40pin-header|40-Pin Header]]. ===== SPDIF Information ===== | ^ PIN ^ GPIO Name ^ GPIO Number ^ ^ VIM3/3L | 13 | PIN.AO10 | 422 | ^ VIM4 | 13 | SPDIFOUT | 420 | ^ VIM1S | 13 | SPDIFOUT | 470 | ===== Enable SPDIF ===== In order to use the SPDIF, you need to enable the SPDIF function via [[products:sbc:common:configurations:device-tree-overlay|Device Tree Overlay]]. For VIM3, edit ''/boot/dtb/amlogic/kvim3.dtb.overlay.env'' to add spdifout node to ''fdt_overlays'' node if it doesn't exist. For VIM3L, edit ''/boot/dtb/amlogic/kvim3l.dtb.overlay.env'' to add spdifout node to ''fdt_overlays'' node if it doesn't exist. e.g. To enable ''SPDIF'', you need to add ''spdifout'' to node ''fdt_overlays'' if it doesn't exist. ```shell fdt_overlays=spdifout ``` After reboot, you can connect your spdif device to corresponding pins. In order to use the SPDIF, you need to enable the SPDIF function via [[products:sbc:common:configurations:device-tree-overlay|Device Tree Overlay]]. Edit ''/boot/dtb/amlogic/kvim4.dtb.overlay.env'' to add spdifout node to ''fdt_overlays'' node if it doesn't exist. e.g. To enable ''SPDIF'', you need to add ''spdifout'' to node ''fdt_overlays'' if it doesn't exist. ```shell fdt_overlays=spdifout ``` After reboot, you can connect your spdif device to corresponding pins. In order to use the SPDIF, you need to enable the SPDIF function via [[products:sbc:common:configurations:device-tree-overlay|Device Tree Overlay]]. Edit ''/boot/dtb/amlogic/kvim1s.dtb.overlay.env'' to add spdifout node to ''fdt_overlays'' node if it doesn't exist. e.g. To enable ''SPDIF'', you need to add ''spdifout'' to node ''fdt_overlays'' if it doesn't exist. ```shell fdt_overlays=spdifout ``` After reboot, you can connect your spdif device to corresponding pins. ===== SPDIF Usage ===== After connecting your device. ``` shell $ aplay -l # find your i2s card and play audio using it $ aplay -D hw:0,0 .wav # replace 0,0 with spdif interface (card,device) ```