NanoHat PCM5102A
Contents
1 Introduction
- The NanoHat PCM5102A module uses TI's DAC audio chip PCM5102A and NS' low-noise, ultra-low dropout LP2992 regulator. PCM5102A's sample rates up to 384kHz and its resolution is 32-bit.
- Its dynamic range is 112dB. Its THD+N at –1 dBFS is -93db. Its full-scale single-ended output is 2.1V. The SNR is 120dB.
- Its onboard VS1838B infrared receiver allows it to be remote-controlled.
- This module has exactly the same dimension as the NanoPi NEO/Air and can be stacked on an NanoPi NEO/Air.
2 Hardware Spec
- Ultra-low out-of-band noise
- Audio data bit length: 16-bit, 24-bit and 32-bit
- Audio format selection: I2S (Low) / Left-justified
- Sampling frequency: 384KHz, resolution: 32-bit
- Onboard infrared receiver
- Pin Description:
NanoPi NEO/Air 24 Pin header is not listed here. Refer to NanoPi NEO/Air's wiki site for more details
NanoPi NEO
NanoPi NEO Air
12Pin header pin description:
Pin | Name | Description |
1 | VDD_5V | 5V Power In |
2 | NC | Not Connected |
3 | NC | Not Connected |
4 | NC | Not Connected |
5 | NC | Not Connected |
6 | IR Receiver | IR Receiver |
7 | NC | Not Connected |
8 | LRCK | I2S/PCM Sample Rate Clock/Sync |
9 | BCK | I2S/PCM Sample Rate Clock |
10 | DIN | I2S/PCM Serial Data Input |
11 | NC | Not Connected |
12 | GND | GND |
3 Hardware & Software Systems that Work with NanoHat PCM5102A
Index | CPU Model | Board Model | OS |
1 | H3 | NanoPi NEO | Allwinner's released Linux-3.4 kernel and Mainline Linux-4.x kernel |
2 | H3 | NanoPi NEO Air | Allwinner's released Linux-3.4 kernel and Mainline Linux-4.x |
3 | H5 | NanoPi NEO2 | Mainline Linux-4.x kernel |
4 | H5 | NanoPi NEO Plus2 | Mainline Linux-4.x kernel |
4 Applications
The NanoHat PCM5102A can be stacked on supported boards. Here is a hardware setup:
5 How to Play
5.1 Under H3 & Linux-3.4 Kernel
If you use a FriendlyElec's H3 board under Allwinner's released Linux-3.4 kernel run the following command to check whether or not the NanoHat PCM5102A is enabled:
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Pcm5102a [Pcm5102a], device 0: Playback pcm5102a-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
card 0 stands for pcm5102a. You can play an audio file by running the following command:
$ aplay /root/Music/test.wav -D plughw:0
-D plughw:0 stands for audio card 0. Connect your module to a speaker and you will hear your music.
5.2 Under H3/H5 & Linux-4.x Kernel
If you use a FriendlyElec's H3/H5 board under Allwinner's released Linux-4.x kernel you need to enable the NanoHat PCM5102A with npi-config:
Start npi-config as root:
$ npi-config
Open the following menu:
Open I2S:
Enable/Disable I2S. By default I2S0 is disabled:
After you enable I2S0 I2C1 will be disabled.After I2S0 is enabled select pcm5102a:
Return to the main menu and do <Finish>. Reboot your system and run the following command to check whether or not the NanoHat PCM5102A is enabled:
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sndsun8ii2sdac [snd-sun8i-i2s-dac], device 0: sun8i-i2s-dac pcm5102a-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
card 0 stands for pcm5102a. You can play an audio file by running the following command:
$ aplay /root/Music/test.wav -D plughw:0
-D plughw:0 stands for audio card 0. Connect your module to a speaker and you will hear your music.
6 Resources
- [Schematic](Schematic - NanoHat PCM5102A.pdf)
- [Datasheet](PCM5102A)
7 Update Log
7.1 Jan-20-2017
- Released English version