Skip to content

Instantly share code, notes, and snippets.

@mylamour
Last active September 30, 2018 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mylamour/202a1e001c01d0656c90e04e52afd936 to your computer and use it in GitHub Desktop.
Save mylamour/202a1e001c01d0656c90e04e52afd936 to your computer and use it in GitHub Desktop.
#Raspberry# #HIFI Berry#

我的是板子是Raspberry Zero W

sudo vim /boot/config.txt

dtoverlay=hifiberry-dac

然后aplay -l检测 声卡是否加载了,你要加载你自己的型号。我的是hifiberry-dac的。可以看到card-1已经加载了hifiberry

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

加载之后,开始配置声音配置。

sudo vim ~/.asoundrc 根据上面的card序号改配置


pcm.!default  {
 type hw card 0
}
ctl.!default {
 type hw card 0
}

ok, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment