Re: Sad about removal of I2S. Why was this change made?


77 posts   Page 3 of 4   1, 2, 3, 4
by ceteras » Tue Apr 03, 2012 12:06 pm
Gert said:

[...]

There was original the idea to use those for a board revision (e.g. A/B) but I have been informed that there are at the moment no plans to use those pins in the software builds. [...] Certainly the current (B-boards only) builds do not use those pins.


Thank you for the very interesting details. From the picture, it seems like there is about 0.05" (1.27mm) room between those resistors, it's relatively easy to solder.

The four pins look like configuration inputs to me, and I guess a driver is needed to activate the I2S on them. But why put the resistors if the config bits are not read? (some are at +3V3, some at GND, here)
Posts: 215
Joined: Fri Jan 27, 2012 1:42 pm
Location: Romania
by Chris.Rowland » Tue Apr 03, 2012 12:42 pm
ceteras said:

But why put the resistors if the config bits are not read? (some are at +3V3, some at GND, here)

If a CMOS input is not pulled high or low it tends to drift to about 50% and take a lot of current. (Horowitz and Hill: the Art of Electronics, P390)
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by ceteras » Tue Apr 03, 2012 12:45 pm
Chris Rowland said:


ceteras said:


But why put the resistors if the config bits are not read? (some are at +3V3, some at GND, here)


If a CMOS input is not pulled high or low it tends to drift to about 50% and take a lot of current. (Horowitz and Hill: the Art of Electronics, P390)



I know, but since they are not all to GND or 3V3, I thought they actually meant something.
Posts: 215
Joined: Fri Jan 27, 2012 1:42 pm
Location: Romania
by rew » Tue Apr 03, 2012 4:40 pm
I would not remove the resistors to get at the I2S. There will be a 10k pullup or pulldown that is unnecessary. So be it! It will cost an extra 0.33 mA of current from the Broadcom or the I2S side, That should be acceptable.
Check out our raspberry pi addons: http://www.bitwizard.nl/catalog/
User avatar
Posts: 396
Joined: Fri Aug 26, 2011 3:25 pm
by nrf » Wed Apr 25, 2012 10:08 pm
Has someone actually tried the "hack" that Gert suggested? I have looked at the waveforms on CONGIF0, CONFIG1, CONFIG2 and CONFIG3 (i.e. the common points of the resistors that Gert is referring to) and I do not see any I2S activity when playing music on the Pi.

Wonder if the GPIO configuration needs to be changed in order to be in ALT2 (as per page 102 of the Broadcom datasheet) and then get the I2S on GPIO28 to GPIO31, i.e. the CONFIG0 to CONFIG3...

How can I easily find out which ALT the GPIOs are configured to? They do not seem to be configured in ALT0 either since on GPIO18 (on the P1 header) you would then get the I2S clock, which again I am not seeing when looking at that node waveform...

Wonder if the GPIO function select registers need to be read back (page 90 of the Broadcom datasheet), which seems like a pain...

Thanks for the help
Posts: 5
Joined: Wed Apr 25, 2012 8:53 pm
by Gert van Loo » Thu Apr 26, 2012 6:49 am
No younrf said:


Has someone actually tried the "hack" that Gert suggested? I have looked at the waveforms on CONGIF0, CONFIG1, CONFIG2 and CONFIG3 (i.e. the common points of the resistors that Gert is referring to) and I do not see any I2S activity when playing music on the Pi.

Wonder if the GPIO configuration needs to be changed in order to be in ALT2 (as per page 102 of the Broadcom datasheet) and then get the I2S on GPIO28 to GPIO31, i.e. the CONFIG0 to CONFIG3...

How can I easily find out which ALT the GPIOs are configured to? They do not seem to be configured in ALT0 either since on GPIO18 (on the P1 header) you would then get the I2S clock, which again I am not seeing when looking at that node waveform...

Wonder if the GPIO function select registers need to be read back (page 90 of the Broadcom datasheet), which seems like a pain...

Thanks for the help



Indeed if you want I2S on those pins you have to:

1/ Program the GPIO pins to be in I2S mode (simple)

2/ Set up the I2S module and provide it with data (a lot more work)

The I2S/PCM module has a DMA interface so it requires little CPU power to drive it with data.

The I2S can be used in input mode too so you could use it to stream music TO the Pi.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2081
Joined: Tue Aug 02, 2011 7:27 am
by nrf » Thu Apr 26, 2012 9:50 am
I have just configured GPIO18 to be in ALT0 instead of the pre-configured ALT1 (by writing 0x04829000 to 0x7E300004 address), so I was expecting to see the I2S clock on pin12 of the P1 header, but still no signal activity. I am checking the waveform while playing music so I thought the Pi would be using the I2S module to provide the audio.
Posts: 5
Joined: Wed Apr 25, 2012 8:53 pm
by nrf » Thu Apr 26, 2012 11:36 am
nrf said:


I have just configured GPIO18 to be in ALT0 instead of the pre-configured ALT1 (by writing 0x04829000 to 0x7E300004 address), so I was expecting to see the I2S clock on pin12 of the P1 header, but still no signal activity. I am checking the waveform while playing music so I thought the Pi would be using the I2S module to provide the audio.


For completeness, the pre-configured value for register address 0x7E300004 was 0x05829000
Posts: 5
Joined: Wed Apr 25, 2012 8:53 pm
by Gert van Loo » Thu Apr 26, 2012 1:50 pm
nrf said:


I have just configured GPIO18 to be in ALT0 instead of the pre-configured ALT1 (by writing 0x04829000 to 0x7E300004 address), so I was expecting to see the I2S clock on pin12 of the P1 header, but still no signal activity. I am checking the waveform while playing music so I thought the Pi would be using the I2S module to provide the audio.



All you have done is step (1) of my previous post.

Until somebody does (2) and writes the SW to route sound to the I2S/PCM module nothing will come out.

Or to explain it differently: You have just toggled the light switch. But in order to get light you need to have somebody generating the electricity for you.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2081
Joined: Tue Aug 02, 2011 7:27 am
by Dave_G_2 » Thu Apr 26, 2012 2:45 pm

nrf said:


I have just configured GPIO18 to be in ALT0 instead of the pre-configured ALT1 (by writing 0x04829000 to 0x7E300004 address), so I was expecting to see the I2S clock on pin12 of the P1 header, but still no signal activity. I am checking the waveform while playing music so I thought the Pi would be using the I2S module to provide the audio.


For completeness, the pre-configured value for register address 0x7E300004 was 0x05829000



Surely you mean 0x7E200004 which is GPIO Alt function select 1 register with bits 26-24 being for GPIO18.

Where as address 0x7E300004 contains the EMMC BLKSIZECNT register.

Is this a typo on your part or have I missed something?
User avatar
Posts: 196
Joined: Sat Apr 14, 2012 7:04 pm
by nrf » Thu Apr 26, 2012 3:44 pm
@Dave_G_2 : yes, that is a typo from my side. I meant address 0x7E200004. Sorry.
Posts: 5
Joined: Wed Apr 25, 2012 8:53 pm
by nrf » Thu Apr 26, 2012 3:48 pm
@Gert: sorry to sound silly but I am missing something here: how is the sound produced by default in the PI? Isn't that via the PCM/I2S which then created the PWM right and left that drive the headphone?
Posts: 5
Joined: Wed Apr 25, 2012 8:53 pm
by Dave_G_2 » Thu Apr 26, 2012 4:34 pm
@nrf

No problem, thanks.

I thought perhaps I misunderstood the address locations and there was yet another relocation by the kernel as the GPIO is apparently also available starting at 0x20000000 according to the Broadcam peripherals datasheet (page 5).
User avatar
Posts: 196
Joined: Sat Apr 14, 2012 7:04 pm
by Gert van Loo » Thu Apr 26, 2012 9:44 pm
nrf said:


@Gert: sorry to sound silly but I am missing something here: how is the sound produced by default in the PI? Isn't that via the PCM/I2S which then created the PWM right and left that drive the headphone?



No, the PWM is driven straight from the GPU using sound-to-PWM software specially written for the Raspberry-Pi. The sound can come from the ALSA driver which passes  ARM messages to the GPU. Unless you're playing video+sound which the GPU can all do without talking to the ARM. The same holds for the sound up the HDMI cable: all different streams. So if you want sound out of your I2S you have to first convert it to the right format and then use the I2S/PCM module to push it out.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2081
Joined: Tue Aug 02, 2011 7:27 am
by blinderdot » Sun May 06, 2012 4:38 pm
I'm sad too that I2S has been removed

I've just registered in order to let you know!

very sad.
Posts: 1
Joined: Fri Apr 27, 2012 5:14 pm
by Thomas S » Mon May 07, 2012 7:05 pm
Reading the documentation of the broadcom chip, PCM/I2S signals can be mapped to: GPIO18, GPIO19, GPIO21 – or to: GPIO28, GPIO29, GPIO31.

According to the diagram:

    * GPIO28, GPIO29 and GPIO31 you use internal to hardware configuration. (and now suggest to hardwire to).

    * GPIO18 and GPIO21 is traced to the pin-headers. However: GPIO19 is NOT.

Since there is several pins on the pin-header not in use, why not trace GPIO19 there, and get it to run I2S with ease ?
Posts: 5
Joined: Mon May 07, 2012 2:05 pm
by mahjongg » Thu May 10, 2012 11:57 am
It might not be technically possible to route out GPIO19, depending on where the physical solderball is located of the BGA, also it would diminish the number of standard (GP)I/O pins if they are redefined as part of the I2S port.
User avatar
Forum Moderator
Forum Moderator
Posts: 5748
Joined: Sun Mar 11, 2012 12:19 am
by speps » Thu Jun 07, 2012 7:54 pm
Gert van Loo wrote:nrf said:


@Gert: sorry to sound silly but I am missing something here: how is the sound produced by default in the PI? Isn't that via the PCM/I2S which then created the PWM right and left that drive the headphone?



No, the PWM is driven straight from the GPU using sound-to-PWM software specially written for the Raspberry-Pi. The sound can come from the ALSA driver which passes  ARM messages to the GPU. Unless you're playing video+sound which the GPU can all do without talking to the ARM. The same holds for the sound up the HDMI cable: all different streams. So if you want sound out of your I2S you have to first convert it to the right format and then use the I2S/PCM module to push it out.


In the meantime, could be there by any chance any way to get better quality from the headphone jack? I can plug my headphones to the screen to get audio from HDMI and get decent quality but the headphone jack has horrible noise in it? Why is that? Is there any workaround?

Cheers, Remi.
Posts: 3
Joined: Sun May 20, 2012 11:40 am
by abel31 » Mon Jun 25, 2012 5:35 pm
Did anybody find a cheap way to get SPDIF on the PI after all?
Posts: 10
Joined: Sun Jun 24, 2012 2:49 pm
by Gert van Loo » Mon Jun 25, 2012 5:45 pm
There is some general work on SW going on in this thread:
viewtopic.php?f=44&t=8496

There seem to be two kind of users following and contributing that thread:
The ones that can live with a limited functionality only coming out on the GPIO pins.
Others who want to picking the missing signals of the board by adding some wires.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2081
Joined: Tue Aug 02, 2011 7:27 am
by xtv » Wed Mar 06, 2013 8:30 pm
+1 disapointement =(

I actually bought the PI for a hd audio project using I2C interface (as listed in BCM2835 datasheet). Would never imagine they would remove such desirable feature from it :cry:
Posts: 1
Joined: Wed Mar 06, 2013 8:17 pm
by Gert van Loo » Thu Mar 07, 2013 7:32 pm
I2S is back on the rev-2 boards.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2081
Joined: Tue Aug 02, 2011 7:27 am
by silverfox0786 » Fri Mar 08, 2013 12:06 am
im confused here

are we talking about I2C or I2S lack of
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
by pluggy » Fri Mar 08, 2013 6:52 am
In the lifetime of this thread the situation has changed. The early posts are from early last year when the Pi didn't have I2S and they were bemoaning the fact. Around October last year the Revision 2 boards were brought out and I2S had been put on. So if you bought a Pi from late last year it will have I2S. The revision 2 boards have 2 mounting holes in them, the Revision 1 boards don't.
Don't judge Linux by the Pi.......
User avatar
Posts: 2637
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by silverfox0786 » Fri Mar 08, 2013 3:16 pm
pluggy wrote:In the lifetime of this thread the situation has changed. The early posts are from early last year when the Pi didn't have I2S and they were bemoaning the fact. Around October last year the Revision 2 boards were brought out and I2S had been put on. So if you bought a Pi from late last year it will have I2S. The revision 2 boards have 2 mounting holes in them, the Revision 1 boards don't.



my 2 Raspi's are only max 2 months old so i think i have the ones with teh mount holes

but i have looked at RasPi Low lever periphrals website numerous times and cant see mention of it

what header is teh mount hole?
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK