GBee
Posts: 10
Joined: Sat Mar 19, 2016 10:44 am

Pi-Digiamp+ with RPi 5

Thu Nov 02, 2023 9:21 pm

There some evidence from the Raspberry Pi 5 data sheet (and fragmented, hard to follow posts in the RPi 5 discussion thread on this forum) that the Raspberry Pi 5 supports up to 4 channels on each of the three available I2S interfaces.

In theory does this now mean that it's possible for simultaneous stereo input and stereo output with the new Pi and, should anyone out there have a clue, whether it's possible that the Pi DACS, and more specifically the Digiamp+ would prevent this from working? The only pinout info I can find (unofficial) shows the Digiamp+ using both the PCM_DIN pin (GPIO20) and PCM_DOUT (GPIO21) even though the Digiamp+ should only need PCM_DOUT?

My project could benefit (cost, simplicity and functionality) from being able to both input stereo audio via i2s and output stereo via i2s audio at the same time, something which is currently impossible with older versions of the Pi.

EDIT: Removed my confused references to the specific mapping of channels to the the GPIO pins since I realised this wasn't really correct and it was taking away from the core question.

NOTE: It's hard to know exactly which pins are actually used by the Digiamp+ because there are no proper datasheets or schematics available for the Pi Foundation DAC Hats that I can find. :cry:

aBUGSworstnightmare
Posts: 9262
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi-Digiamp+ with RPi 5

Thu Nov 09, 2023 5:34 am

GBee wrote:
Thu Nov 02, 2023 9:21 pm
...
NOTE: It's hard to know exactly which pins are actually used by the Digiamp+ because there are no proper datasheets or schematics available for the Pi Foundation DAC Hats that I can find. :cry:
first of all, the overlay will tell. Secondly, the old iQAudio documentation is still around on the web and linked by some official resellers i.e. https://www.berrybase.de/media/pdf/e7/8 ... D97kJH.pdf
GBee wrote: My project could benefit (cost, simplicity and functionality) from being able to both input stereo audio via i2s and output stereo via i2s audio at the same time, something which is currently impossible with older versions of the Pi.
seriously? Why the hell are all this DACs working then i.e. https://www.hifiberry.com/shop/boards/h ... y-dac-dsp/ or the https://www.raspberrypi.com/products/codec-zero/ which has stereo in and out...

GBee
Posts: 10
Joined: Sat Mar 19, 2016 10:44 am

Re: Pi-Digiamp+ with RPi 5

Thu Nov 09, 2023 10:50 am

aBUGSworstnightmare wrote:
Thu Nov 09, 2023 5:34 am
GBee wrote: My project could benefit (cost, simplicity and functionality) from being able to both input stereo audio via i2s and output stereo via i2s audio at the same time, something which is currently impossible with older versions of the Pi.
seriously? Why the hell are all this DACs working then i.e. https://www.hifiberry.com/shop/boards/h ... y-dac-dsp/ or the https://www.raspberrypi.com/products/codec-zero/ which has stereo in and out...
That's a very good question.

We can immediately dismiss the Codec Zero, it only supports Mono In/Out if you look at the documentation. Which fits with what I found during research.
Codec Zero Documentation wrote:Codec Zero allows you to use a variety of input and output devices, such as the built-in MEMS
microphone and external mono electret microphones, as well as 1.2W 8Ω mono speakers.

I would also observe that the Hifiberry DSP product page doesn't clearly state that the digital input (TOSLINK) will be routed to the Raspberry Pi. It's billed as a Pi Controlled DSP and a DSP is typically used as a man in the middle device between your input source and speakers to enable digital equalisation and other processing. Indeed since processing is done on the board itself, you wouldn't need the audio to go to the Pi in this case. So I'm not really able to tell whether this confirms or disproves the statement that simultaneous Stereo input and output are in fact possible.

I read about the I2S 'channel' limitation in a few places and made sure to confirm the same using either a datasheet/code (I don't clearly remember which). However referring back to one place where this is mentioned started me thinking that this could be a simple confusion between 'I2C channel' and 'audio channel'. (This happens a LOT in my day job as the use of the word channel is common in many different contexts).

Case in point, this post by 'adafruit_support_mike' on the Adafruit forums:
https://forums.adafruit.com/viewtopic.p ... 28#p710328
adafruit_support_mike wrote: The simplest kind of I2S bus has three pins: DATA, CLOCK, and LEFT/RIGHT. With each tick of CLOCK, one bit of information comes in or goes out on DATA. If LEFT/RIGHT is low, that bit belongs to a chunk of data for the left channel. If LEFT/RIGHT is high, the bit belongs to a chunk of data for the right channel. The I2S bus operates by clocking N bits out on the left channel, N bits out on the right channel, N bits out on the left channel again, and so on.

There are more advanced versions that use more signals to control more than two channels, but the RasPi's I2S bus doesn't support them. You only get two channels of I2S data on a RasPi. You can have two channels of mic input, two channels of speaker output, or one of each.
In hindsight it could well be here that in the first paragraph he's using channel in the 'audio' sense of the word, while seamlessly switching to using it in the 'i2s' sense, i.e. an I/O channel, in the second paragraph.

However I really wish I could remember in which 'official' source (code or datasheet) I found confirmation of my interpretation of this information. That resource I thought more explicitly indicated that you could have (Mono IN AND Mono OUT) OR (Stereo IN OR Stereo OUT). At the very least I wish I could find something definitive that suggests the opposite is true, that you can have simultaneous Stereo IN/OUT on the Raspberry Pi I2S pins.

aBUGSworstnightmare
Posts: 9262
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi-Digiamp+ with RPi 5

Thu Nov 09, 2023 11:10 am

Well, if you think there is no input on the product fine for me.
anyhow, you should have a look at this : https://www.hifiberry.com/docs/hardware ... recording/ and check https://www.hifiberry.com/docs/hardware ... ry-boards/ while comparing it to your Pi's GPIO usage.

Good luck!

czarop
Posts: 3
Joined: Wed Jan 24, 2024 5:58 pm

Re: Pi-Digiamp+ with RPi 5

Mon Jan 29, 2024 8:33 am

Unrelated to the initial question but still concerning Pi5 and the DigiAmp+, my understanding is the Pi5 is powered directly from the digiamp, receiving 2.5A - however Pi5 is recommended minimum 3A (and ideally 5A) - does anyone know if the digiAmp+ is therefore compatible with Pi5?

User avatar
GTR2Fan
Posts: 2011
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Pi-Digiamp+ with RPi 5

Sun Feb 11, 2024 8:24 pm

EDIT: I'm confused.
Last edited by GTR2Fan on Mon Feb 12, 2024 11:14 pm, edited 2 times in total.
Pi5 8GB Mini-PC/Media Centre running Raspberry Pi OS with KODI, 1TB Lexar NM790 SSD on Pimoroni NVMe Base at Gen 3 (870MB/s read), GeeekPi aluminium heatsink case for passive cooling.

GBee
Posts: 10
Joined: Sat Mar 19, 2016 10:44 am

Re: Pi-Digiamp+ with RPi 5

Mon Feb 12, 2024 1:10 pm

To clarify, are you saying you're able to both output and input stereo (separate channels vs split mono) via I2S on the Pi 4 at the same time?

User avatar
GTR2Fan
Posts: 2011
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Pi-Digiamp+ with RPi 5

Mon Feb 12, 2024 11:21 pm

I have no idea whether it's using I2S or not. It's just a standard installation, so I guess so.

It can't simultaneously input and output the same stereo source*, but it can input one stereo source whilst outputting another.

Example: I can record from the stereo inputs with Audacity whilst listening to BBC Sounds as stereo outputs.

I have two pairs of RCA jack sockets soldered to the PCB, hence L&R in and L&R out.

*This may be down to the way AlsaMixer is configured, but I'm reluctant to fart around with it as my knowledge is limited.
Pi5 8GB Mini-PC/Media Centre running Raspberry Pi OS with KODI, 1TB Lexar NM790 SSD on Pimoroni NVMe Base at Gen 3 (870MB/s read), GeeekPi aluminium heatsink case for passive cooling.

Return to “HATs and other add-ons”