I'm using a headless raspberry pi
firstly type: alsamixer and press f6 - you will see the hat is not there.
enable the hardware..
sudo nano /boot/firmware/config.txt
enter
dtoverlay=allo-boss-dac-pcm512x-audio
(from How to set up Allo BOSS DAC hat for your Headless Raspberry Pi | How To Hi-Fi)
reboot..
check your devices..
aplay -l
you can see here that deivce is card 1, device 0
card 1: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 [Boss DAC HiFi [Master] pcm512x-hifi-0]