0

Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by jpete24 on Thu Oct 20, 2016 9:57 am

meedio wrote:Hey,

got one of these amps in the mail yesterday and it works great! However I can't seem to get the software volume to work no matter what. I used the asound.conf posted here yet alsamixer still only says "This sound device does not have any controls". I even tried starting from a fresh Raspbian image but no dice. Am I missing a necessary package or something?

My aplay -l looks a bit different from what Thanos posted earlier in this thread:
Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Pretty sure I've wired it right though since it does play sound...

Here's my asound.conf and the other relevant files: http://pastebin.com/BhRqteue

EDIT: Fixed. Restarting alsa/rebooting the Pi didn't work but running
Code: Select all | TOGGLE FULL SIZE
speaker-test -Ddefault -c2

made the control appear.


This is odd. It does look different than what was shown on Thanos. I'd scrap and re download the image from the other location to see if that doesn't solve your issue?

jpete24
 
Posts: 71
Joined: Tue May 17, 2016 2:58 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by meedio on Thu Oct 20, 2016 1:38 pm

Oh yeah what I forgot to mention was I'm building an internet radio so I'm not using retropie. Come to think of it all the instructions I've seen for this so far have been for retropie specifically. Is it somehow different from Raspbian in how it handles audio devices?

So as mentioned in my last post I got the volume control to appear but it's not behaving quite as I thought it would. Unless I'm explicitly playing through "hifiberry" as in
Code: Select all | TOGGLE FULL SIZE
speaker-test -D hifiberry -c2

the volume control is ignored and sound plays at full volume.

The weird thing is as far as I understand the snippet
Code: Select all | TOGGLE FULL SIZE
pcm.!default {
    type plug
    slave.pcm "hifiberry"
}


should actually set the default device to point to "hifiberry", right?

I'm totally fine with it as it is, just had to configure mplayer to use hifiberry as the default playback device, but if someone happens to know why it works like this I'd be happy to learn. :)

meedio
 
Posts: 2
Joined: Wed Oct 19, 2016 11:25 am

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by wolffman007 on Thu Jul 19, 2018 4:35 pm

Hey all - just posted a question in another forum but I think it applies here (OP: viewtopic.php?f=50&t=138450)

Curious as to whether or not you will still need the low pass filtering that Adafruit recommended when adding the PWM audio or does the I2S negate the need for that? From the pictures and reading it seems like that is no longer needed. It looks simple enough to setup, the coding may be tricky for me. Below is a screen shot from one of the schematics I found that uses the I2S as a stand alone solution - not sure if that wiring is still up to par with what everyone else has.

My goal is to use this amp with a tiny speaker (https://www.adafruit.com/product/1890) on a portable MAME emulator
Attachments
Tiny-MAME-Wiring-Diagram.png
Tiny-MAME-Wiring-Diagram.png (180.2 KiB) Viewed 97 times

wolffman007
 
Posts: 13
Joined: Wed Jul 27, 2016 3:15 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by jpete24 on Thu Jul 19, 2018 5:19 pm

wolffman007 wrote:Hey all - just posted a question in another forum but I think it applies here (OP: viewtopic.php?f=50&t=138450)

Curious as to whether or not you will still need the low pass filtering that Adafruit recommended when adding the PWM audio or does the I2S negate the need for that? From the pictures and reading it seems like that is no longer needed. It looks simple enough to setup, the coding may be tricky for me. Below is a screen shot from one of the schematics I found that uses the I2S as a stand alone solution - not sure if that wiring is still up to par with what everyone else has.

My goal is to use this amp with a tiny speaker (https://www.adafruit.com/product/1890) on a portable MAME emulator


I2S comes out absolutely crisp. You won't need the low pass filter.

jpete24
 
Posts: 71
Joined: Tue May 17, 2016 2:58 pm

Please be positive and constructive with your questions and comments.