Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

Guest newbe5

There are some voltages variables for the speakers. Lowering those slightly along with the volume might help.

The default brightness has to be lowered a bit as well.

Volume settings can be found in sound/soc/codecs/alc5624.c.

I am still looking for the specific variables. I forgot where they are and what they were called.

All in all, we must lower all these values to reduce the chance of overheating and damaging more devices.

default brightness:

arch/arm/mach-tegra/board-shuttle-gpu.c:

.max_brightness = 255,

.dft_brightness = 224,

.pwm_period_ns = 1000000,

.dft_brightness should be set to something lower like 200

Thankyou very much for the reply and the info mate! We will get on this tomorrow and try to make the adjustments ASAP to hopefully prevent anyone damaging their tab (I have watched movies on mine at max volume and haven't had a single issue, but there may be people wit non-advent/pov tabs, such as the Viewsonic Viewpad, which might not have as well-built speakers to handle this!).

newbe5

Link to comment
Share on other sites

Guest a_appleby

Thankyou very much for the reply and the info mate! We will get on this tomorrow and try to make the adjustments ASAP to hopefully prevent anyone damaging their tab (I have watched movies on mine at max volume and haven't had a single issue, but there may be people wit non-advent/pov tabs, such as the Viewsonic Viewpad, which might not have as well-built speakers to handle this!).

newbe5

It looks like there aren't two identical devices, even if they are the same brand and model, they might be from another batch. These are subtle differences.

Can anyone try this patch when building a kernel?

http://nv-tegra.nvid...fa357d13d5d5011

It's supposed to reduce memory usage a bit for video playback and should stop the video memory from grabbing so much RAM.

Edited by a_appleby
Link to comment
Share on other sites

Guest Cass67

Might be worth pulling the viewpad source to see the default values and adding an ifdef if possible.. ill pull tomorrow if someone does not already have it...

Link to comment
Share on other sites

Guest ejtagle
Thankyou very much for the reply and the info mate! We will get on this tomorrow and try to make the adjustments ASAP to hopefully prevent anyone damaging their tab (I have watched movies on mine at max volume and haven't had a single issue, but there may be people wit non-advent/pov tabs, such as the Viewsonic Viewpad, which might not have as well-built speakers to handle this!).newbe5
Unfortunately, this does not work as you could be expecting... The audio voltage setting in the spkvdd_mv member in the alc5624_pdata does not set the voltage the audio amplifier is using. Instead, it informs the audio codec driver the voltage that the codec chip power audio amplifier is powered with. So, that voltage is just informative. It is not programmable at all. I have personally measured the voltage powering the ALC codec power amplifier, and it is 5v. The only way to limit power to the speakers is to scale the volume value used to program the codec. I will provide a patch to implement it, if needed. It is not hard to do.BTW, the ALC has 1W per channel. I thought that that power level was more than safe for normal speakers. Guess i was wrong...

Attached the required patch. Now there is a spkvol_scale that should let scale the volume range to a given percent of the full range. I compiled it but had no time to test it (i ran out of time... ), but if anyone can try it... I will test it tomorrow...

BTW, though i have tried to port the vega support to the latest .36 nvidia kernel, there is a huge piece of code missing: The official .36 nvidia kernel completely lacks sound support. There are tons of alternate HEADs there with varying amounts of sound and video support. Differences are so huge between nvidia Heads that seems very risky to try to use them. Nowadays the only reasonable thing i see is to stick to the .36 kernel that we have, that at least seems to work... and perhaps, do some cherrypicks on specific patches to apply. Does anyone have a better idea here? - Choosing the right HEAD/tag can lead to success or to a total disaster...

ts.rar

Edited by ejtagle
Link to comment
Share on other sites

Guest newbe5

Unfortunately, this does not work as you could be expecting... The audio voltage setting in the spkvdd_mv member in the alc5624_pdata does not set the voltage the audio amplifier is using. Instead, it informs the audio codec driver the voltage that the codec chip power audio amplifier is powered with. So, that voltage is just informative. It is not programmable at all. I have personally measured the voltage powering the ALC codec power amplifier, and it is 5v. The only way to limit power to the speakers is to scale the volume value used to program the codec. I will provide a patch to implement it, if needed. It is not hard to do.BTW, the ALC has 1W per channel. I thought that that power level was more than safe for normal speakers. Guess i was wrong...

Attached the required patch. Now there is a spkvol_scale that should let scale the volume range to a given percent of the full range. I compiled it but had no time to test it (i ran out of time... ), but if anyone can try it... I will test it tomorrow...

BTW, though i have tried to port the vega support to the latest .36 nvidia kernel, there is a huge piece of code missing: The official .36 nvidia kernel completely lacks sound support. There are tons of alternate HEADs there with varying amounts of sound and video support. Differences are so huge between nvidia Heads that seems very risky to try to use them. Nowadays the only reasonable thing i see is to stick to the .36 kernel that we have, that at least seems to work... and perhaps, do some cherrypicks on specific patches to apply. Does anyone have a better idea here? - Choosing the right HEAD/tag can lead to success or to a total disaster...

Thankyou! As always you know so much more about this than I tend to understand :P I have just had a reply from someone on twitter:

@Zebwen I have viewpad. And the smell is not from the speaker, but from the wires on the usb.

Is this possible? I have noticed a small crackling sound on my PC when connecting the USB cable when hooked up to power. Just trying to make sure I pi this down :P

newbe5

Link to comment
Share on other sites

Guest a_appleby

Unfortunately, this does not work as you could be expecting... The audio voltage setting in the spkvdd_mv member in the alc5624_pdata does not set the voltage the audio amplifier is using. Instead, it informs the audio codec driver the voltage that the codec chip power audio amplifier is powered with. So, that voltage is just informative. It is not programmable at all. I have personally measured the voltage powering the ALC codec power amplifier, and it is 5v. The only way to limit power to the speakers is to scale the volume value used to program the codec. I will provide a patch to implement it, if needed. It is not hard to do.BTW, the ALC has 1W per channel. I thought that that power level was more than safe for normal speakers. Guess i was wrong...

Attached the required patch. Now there is a spkvol_scale that should let scale the volume range to a given percent of the full range. I compiled it but had no time to test it (i ran out of time... ), but if anyone can try it... I will test it tomorrow...

BTW, though i have tried to port the vega support to the latest .36 nvidia kernel, there is a huge piece of code missing: The official .36 nvidia kernel completely lacks sound support. There are tons of alternate HEADs there with varying amounts of sound and video support. Differences are so huge between nvidia Heads that seems very risky to try to use them. Nowadays the only reasonable thing i see is to stick to the .36 kernel that we have, that at least seems to work... and perhaps, do some cherrypicks on specific patches to apply. Does anyone have a better idea here? - Choosing the right HEAD/tag can lead to success or to a total disaster...

Did you take a look at the 11.2.11 kernel ? Our kernel is based on an older version of that development line, the 11.2.x. From what I noticed so far when trying to cherrypick patches, I only got some bars on the screen, even with just a single patch like the one I posted. Maybe my Vega is dying.

I tried to port the video driver from 12r5 to our kernel and got some errors related to headers and other files from other places in the kernel source tree.

If it's not possible to rebase on 11.2.11, we should look at all patches since 11.2.4 up to 11.2.11 and see what is usable. There are a lot of conflicts there. Our kernel isn't a pure 11.2.x kernel, some of the patches haven't made it when some folks performed merges due to the changes they made to the tree.

I can try to rebase on the 11.2.11 kernel. It doesn't seem like too much work.

Link to comment
Share on other sites

Guest Cass67

Thankyou! As always you know so much more about this than I tend to understand :P I have just had a reply from someone on twitter:

@Zebwen I have viewpad. And the smell is not from the speaker, but from the wires on the usb.

Is this possible? I have noticed a small crackling sound on my PC when connecting the USB cable when hooked up to power. Just trying to make sure I pi this down :P

newbe5

yeah the usb has some voltage go through it (5v?) , when i connect it to my laptop and when the laptop is connected to a monitor via vga, the monitor blanks for a second or so .. happens every time ... i figured a crap cable or poor earthing on the laptop .. who knows...

Link to comment
Share on other sites

Guest BillyBobJoe

yeah the usb has some voltage go through it (5v?) , when i connect it to my laptop and when the laptop is connected to a monitor via vga, the monitor blanks for a second or so .. happens every time ... i figured a crap cable or poor earthing on the laptop .. who knows...

I have had a lot of trouble even getting the USB to work with the new kernel, it resets for no reason and one machine struggle to even see the Vega at all. This now make some sense and I feel a little better that it wasn’t just me doing something stupid with the config.

Billy..

Link to comment
Share on other sites

Guest rebel1

Unfortunately, this does not work as you could be expecting... The audio voltage setting in the spkvdd_mv member in the alc5624_pdata does not set the voltage the audio amplifier is using. Instead, it informs the audio codec driver the voltage that the codec chip power audio amplifier is powered with. So, that voltage is just informative. It is not programmable at all. I have personally measured the voltage powering the ALC codec power amplifier, and it is 5v. The only way to limit power to the speakers is to scale the volume value used to program the codec. I will provide a patch to implement it, if needed. It is not hard to do.BTW, the ALC has 1W per channel. I thought that that power level was more than safe for normal speakers. Guess i was wrong...

Attached the required patch. Now there is a spkvol_scale that should let scale the volume range to a given percent of the full range. I compiled it but had no time to test it (i ran out of time... ), but if anyone can try it... I will test it tomorrow...

BTW, though i have tried to port the vega support to the latest .36 nvidia kernel, there is a huge piece of code missing: The official .36 nvidia kernel completely lacks sound support. There are tons of alternate HEADs there with varying amounts of sound and video support. Differences are so huge between nvidia Heads that seems very risky to try to use them. Nowadays the only reasonable thing i see is to stick to the .36 kernel that we have, that at least seems to work... and perhaps, do some cherrypicks on specific patches to apply. Does anyone have a better idea here? - Choosing the right HEAD/tag can lead to success or to a total disaster...

Hi,

i tested your spkvol_scale , it seems that it have no effect. The Volume is loud as before, there is no change at all.

Link to comment
Share on other sites

Guest ejtagle

Hi,

i tested your spkvol_scale , it seems that it have no effect. The Volume is loud as before, there is no change at all.

Will try to debug this today. Yesterday i ran out of time ... (it was too late, and i was very tired at that time) ... It should be easy to fix...

Link to comment
Share on other sites

Guest wooshy1

Thankyou! As always you know so much more about this than I tend to understand :P I have just had a reply from someone on twitter:

@Zebwen I have viewpad. And the smell is not from the speaker, but from the wires on the usb.

Is this possible? I have noticed a small crackling sound on my PC when connecting the USB cable when hooked up to power. Just trying to make sure I pi this down :P

newbe5

I did notice that in the .32 kernel config we have these options set in usb gadget support

Maximum VBUS Power usuage (2-500ma) = 2

USB peripheral controller = DUMMY HCD (DEVELOPMENT)

however we have them set like this in .36 kernel config

Maximum VBUS Power usuage (2-500ma) = 500

USB peripheral controller = Freescale Highspeed USB DR Peripheral Controller

I don't think the usb peripheral controller option will make a difference but the Maximum VBUS power usage may help.

Link to comment
Share on other sites

Guest newbe5

I have now pulled Test Build 44 of VegaComb as around 6 people have now reported smoking, or blown speakers, I cannot risk it affecting more people :( It seems like it is ruining the quality of their speakers most of the time, rather than actually blowing them completely :/

I will put up a new build once this has been resolved, it's been 100% fine for me though, my speakers have been working perfectly!

newbe5

Link to comment
Share on other sites

Guest ejtagle

I have now pulled Test Build 44 of VegaComb as around 6 people have now reported smoking, or blown speakers, I cannot risk it affecting more people :( It seems like it is ruining the quality of their speakers most of the time, rather than actually blowing them completely :/

I will put up a new build once this has been resolved, it's been 100% fine for me though, my speakers have been working perfectly!

newbe5

Well, i din't expect that. Seems the manufacturers are using sometimes cheaper speakers that are not able to handle the 1W the codec is able to deliver... I really doubt the speakers blow, but i can easily understand that the speakers could degrade permanently .. I will try to fix the patch i provided so the audio can't be set higher than the maximum percent allowable for a such low quality speakers...

Link to comment
Share on other sites

Guest newbe5

Well, i din't expect that. Seems the manufacturers are using sometimes cheaper speakers that are not able to handle the 1W the codec is able to deliver... I really doubt the speakers blow, but i can easily understand that the speakers could degrade permanently .. I will try to fix the patch i provided so the audio can't be set higher than the maximum percent allowable for a such low quality speakers...

Thankyou very much mate! We always point out that it is at the users risk to flash a new ROM, but it is rare that it causes physical damage. It only seems to be affeting a very small number of people, but I couldn't risk it becoming more. I have watched 2 movies and played a ton of games and video on flash sites on my Vega, and I ahven't had a single problem. It seems that some people were unlucky to have a lower quality batch maybe :(

I will await the patch before making any further releases! You are doing an amazing job, and this, while upsetting for those involved, is unfortunately the risk for this kind of bleeding edge stuff! Keep up the great work!

Rich

Link to comment
Share on other sites

Guest the_corvus

Thankyou very much mate! We always point out that it is at the users risk to flash a new ROM, but it is rare that it causes physical damage. It only seems to be affeting a very small number of people, but I couldn't risk it becoming more. I have watched 2 movies and played a ton of games and video on flash sites on my Vega, and I ahven't had a single problem. It seems that some people were unlucky to have a lower quality batch maybe :(

I will await the patch before making any further releases! You are doing an amazing job, and this, while upsetting for those involved, is unfortunately the risk for this kind of bleeding edge stuff! Keep up the great work!

Rich

I'm one of the affected... not smoke, but right speaker is really stalled... it has a cracked sound.. :(.

I try to fix using equalizer app from market and it works better if i pull down 230Hz. Is not a fix, but sound better.

I was getting the back of the table really hot (almost 40º C), but i compiled a new kernel using:

Seems that now it get less hot...

Doing more test...

Corvus.

Link to comment
Share on other sites

Guest rebel1

I'm one of the affected... not smoke, but right speaker is really stalled... it has a cracked sound.. :(.

I try to fix using equalizer app from market and it works better if i pull down 230Hz. Is not a fix, but sound better.

I was getting the back of the table really hot (almost 40º C), but i compiled a new kernel using:

Seems that now it get less hot...

Doing more test...

Corvus.

Welcome to the club, mine is the left speaker that have cracked sound. ;)

But a few stripes from a medical tape directly on the speaker, called hansaplast works great as fix.

Rene

Link to comment
Share on other sites

Guest BillyBobJoe

Welcome to the club, mine is the left speaker that have cracked sound. ;)

But a few stripes from a medical tape directly on the speaker, called hansaplast works great as fix.

Rene

As a simple thought it sounds as if the sound driver is literally running at to high a voltage. Good speakers will have a stop fitted to no allow the diaphragm to extend to far either direction.

You may find that with your tape fix you are mearly holding back the force created by the electro magnetic copper coil. If poeple have been vry unlucky the shielding on the copper coil has melted and therefore perminently damaged the speakers.

There must be an option somewhere to limit the voltage output of the amplifier, and I know many have been suggested, including Wooshy and Maximum VBUS Power usuage (2-500ma) = 500.

Hope we can find an answer soon.

Billy..

Link to comment
Share on other sites

Guest brucelee666

May be nothing but seeing as newbe5 mentioned that initial reports with the speaker problem were viewpad(g-tablet ?) I know people with the vega have now also reported the problem

The person who did a breakdown of the g-tableT, mentions its an alc5623 chip (he could of been wrong):-

Breakdown of g-tablet

Data sheet for alc5623

The driver in the kernel is for the alc5624

Data sheet for alc5624

Going to ask a stupid question but android is using the alc5624 driver/codec ? (I know your getting sound so it should be) but my thinking is all tegra dev kits and the asus transformer use the "Wolfson WM8903 L" driver/codec (which is built as part of the kernel I think ?), I don't know how much of the libs you changed but unchanged the transformer lib files would look for this driver/codec (correct ? libaudio mentions it) WM8903 info

Edited by brucelee666
Link to comment
Share on other sites

Guest ejtagle

May be nothing but seeing as newbe5 mentioned that initial reports with the speaker problem were viewpad(g-tablet ?) I know people with the vega have now also reported the problem

The person who did a breakdown of the g-tableT, mentions its an alc5623 chip (he could of been wrong):-

Breakdown of g-tablet

Data sheet for alc5623

The driver in the kernel is for the alc5624

Data sheet for alc5624

Going to ask a stupid question but android is using the alc5624 driver/codec ? (I know your getting sound so it should be) but my thinking is all tegra dev kits and the asus transformer use the "Wolfson WM8903 L" driver/codec (which is built as part of the kernel I think ?), I don't know how much of the libs you changed but unchanged the transformer lib files would look for this driver/codec (correct ? libaudio mentions it) WM8903 info

I can confirm the POV shuttle uses the ALC5624. I physically checked this by opening the tablet and reading the chip label. Yes, originally the Tegra devkit used a WM8903, but the ALC5624 integrates a power amplifier, saving BOM costs to the manufacturer (less components, cheaper).

If you try to use the wm8903 driver for the ALC5624, it won-t work at all. The internal programming is different.

Regarding power, the only thing that can be done to limit power reaching the speakers, is just to lower down the speaker volume. You can do it using an ALSA mixer, but i assume Android already controls the ALSA mixer, so the only "safe" way to limit speaker volume is to limit the maximum allowable volume at the driver level. That is what i tried to do with the latest patch. Seems there is a bug somewhere.

Nowadays i am porting the vega support patches and drivers to the latest 11.2.11 nvidia kernel. I already checked out the nvidia repo, and i am working on the porting (not finished yet, again ran out of time while doing it :( ) ... and, once i get it running, i will also port the volume limiting patch. A very strange thing is that the default volume is less than half the maximum possible... What is happening here is very strange. The ALC5624 has 1Wrms per speaker output. I didn-t think that was a problem at all... but, perhaps, those manufacturers are using 100mW speakers (the ones used in headphones!) ... It would be nice to try to get the speaker model used, so we can check the maximum power supported by it, and limit the volume of the ALC accordingly... :S

Link to comment
Share on other sites

Guest rebel1

I can confirm the POV shuttle uses the ALC5624. I physically checked this by opening the tablet and reading the chip label. Yes, originally the Tegra devkit used a WM8903, but the ALC5624 integrates a power amplifier, saving BOM costs to the manufacturer (less components, cheaper).

If you try to use the wm8903 driver for the ALC5624, it won-t work at all. The internal programming is different.

Regarding power, the only thing that can be done to limit power reaching the speakers, is just to lower down the speaker volume. You can do it using an ALSA mixer, but i assume Android already controls the ALSA mixer, so the only "safe" way to limit speaker volume is to limit the maximum allowable volume at the driver level. That is what i tried to do with the latest patch. Seems there is a bug somewhere.

Nowadays i am porting the vega support patches and drivers to the latest 11.2.11 nvidia kernel. I already checked out the nvidia repo, and i am working on the porting (not finished yet, again ran out of time while doing it :( ) ... and, once i get it running, i will also port the volume limiting patch. A very strange thing is that the default volume is less than half the maximum possible... What is happening here is very strange. The ALC5624 has 1Wrms per speaker output. I didn-t think that was a problem at all... but, perhaps, those manufacturers are using 100mW speakers (the ones used in headphones!) ... It would be nice to try to get the speaker model used, so we can check the maximum power supported by it, and limit the volume of the ALC accordingly... :S

Hi,

i try to find out what speaker model is used, but unfortunately there is no model number or something on it, only a label

with an shuttle number.

P.S.: I have a POV Mobii 3G too.

Link to comment
Share on other sites

Guest newbe5

Here is an interesting point:

I also have a "burnt" speaker - weirdly I had the sound turned off, I tried installing the updated market apk and then rebooted as the vega got a bit confused (didn't seem to work).

During that reboot the metal cover at the bottom-right became exceptionally hot, and a tiny bit of nasty smelling smoke came out.

Anyway, no biggy as I rarely the speakers anyway, and oddly the left speaker seems to work fine.

(I think it was rebooting, but I may have shutdown instead).

Could it be a component NEAR the speaker overheating, rather than the speaker itself? I mean, I still think we need to lower the volume, but just thought I had better point this out too!

newbe5

Link to comment
Share on other sites

Guest BillyBobJoe

Here is an interesting point:

Could it be a component NEAR the speaker overheating, rather than the speaker itself? I mean, I still think we need to lower the volume, but just thought I had better point this out too!

newbe5

It sounds like you are smelling one of the transistors overheating as it is being driven to hard. They will run near theoretic maxim for short periods but if they are run constantly then they will oveheat and fail.

Eduardo if you are able to check the board directly cna you see what is running across the speakers without any 'sound' being sent to the speakers to work out if there is a constant potelial different across them. If there is then this means the amp and speakers are under constrant load which may be causing the coils and the amps transistos to overheat.

It has been a long time since I have done any work a the component level but please let me know what you find.

Billy..

PS. As my Vega is still 'under warranty' I'm not going to pull it apart. Don't mind helping where I can but the wife would kill me if I wrecked it.

Link to comment
Share on other sites

Guest ejtagle

It sounds like you are smelling one of the transistors overheating as it is being driven to hard. They will run near theoretic maxim for short periods but if they are run constantly then they will oveheat and fail.

Eduardo if you are able to check the board directly cna you see what is running across the speakers without any 'sound' being sent to the speakers to work out if there is a constant potelial different across them. If there is then this means the amp and speakers are under constrant load which may be causing the coils and the amps transistos to overheat.

It has been a long time since I have done any work a the component level but please let me know what you find.

Billy..

PS. As my Vega is still 'under warranty' I'm not going to pull it apart. Don't mind helping where I can but the wife would kill me if I wrecked it.

On this weekend i'll try to measure it. Just for the record, i also have a POV mobii :)

Link to comment
Share on other sites

Guest the_corvus

Welcome to the club, mine is the left speaker that have cracked sound. ;)

But a few stripes from a medical tape directly on the speaker, called hansaplast works great as fix.

Rene

With screen up mine is the right one... next to he usb port... Yours is right or left with screen up??? Because i think that is not a real speaker problem, its a near speaker problem...

I this photo:

5209067148_da6308ef40.jpg

With screen down, down in the photo is left, left is up...etc. I think something somewhere near the speaker is getting too hot (not the speaker directly), my batt had marked more than 40ºC and is not really near this point. So this speaker seems to be the failing one, because the temperature is too hot, and it depends of the quality of the speakers if it resist this hot.

I think this because:

1) For what i read, only this speaker is failing, the one next to the usb port. If there is a volume problem, why didnt blow the 2 speakers?

2) Like i said before, with volume 0 the back of the tablet gets very hot (like when we are using overclocking in Corvus5).

3) It seems that the change in mvolts from 500 to 2 is helping, but is getting hot too, maybe less, but more that with Corvus5 or old Vegacomb.

So i think that some component is getting really hot and kill this speaker, but i dont know how can we check it.

Corvus.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.