Guest Cass67 Posted December 23, 2011 Report Posted December 23, 2011 (edited) Don't see why not. If it worked on VC :) just don't have one on the Vega so never enters my mind.... Edited December 23, 2011 by Cass67
Guest misterjoji Posted December 23, 2011 Report Posted December 23, 2011 somehow it does not work on VC. i applied the patch eduardo had supplied.. don't know what i did wrong
Guest ejtagle Posted December 23, 2011 Report Posted December 23, 2011 (edited) Good news, flashed yesterdays compile with ALLOW_DEQUEUE_CURRENT_BUFFER=false in place and ive been unable to make it crash again, even returning from sleep.. so seems like on first attempt we hit gold, so nice work there Eduardo looking that one out :) Seems now all that really is breaking stuff is audio not being in place, dont think we are in bad shape at all .... camera and audio .. cant think of anything else right now ... Ohh on another note, i disabled dynamic gpu mem allocation as it seems not to be working as id expect, was getting out of memory issues on the youtube app the other day ... changed it to have a static 128mb and ive not seen the errors again ... i may put this back in place now that GL is not giving us static to see what occurs ... Cheers Cass Pretty good news! ... Regarding audio, i still have to figure out the cause. Yesterday i downloaded ICS 4.0.3 AOSP and found out that the audio driver source code required by android to use the ALSA interface provided by the kernel for the xoom is provided. e could either use it, write a new one, or (preferably, we should use the binary that we were using in VC. I should explain why: The problem is the HDMI output of the tegra2. Android does not support the idea of separate displays and independant displays at the framework level. As you have seen, except for the youtube app, the android desktop is cloned by the hdmi output. The way this was implemented is by a slightly modified gralloc (the one that we are using right now) and the tegra_alsa hw driver that was used in VC. When an HDMI plug is detected, then the gralloc clones the android desktop to the hdmi output by simply copying the displayed frame to both outputs. Similarly, the tegra2_alsa driver copies the audio output to both the ALSA device (the internal sound card) and the HDMI output. If we don't use the tegra2_alsa driver, we won't have audio through the HDMI port :( -- Unless we add specific code to handle this cloning to our own version... That would require to mess with the Nvidia propietary APIs ... As far as i have investigated the issue, it should be perfectly possible to use the tegra_alsa driver we were using in VC, and ICS has support to load it :) --- At least, that is the info i was able to gather until now :) Edited December 23, 2011 by ejtagle
Guest brucelee666 Posted December 23, 2011 Report Posted December 23, 2011 (edited) Pretty good news! ... Regarding audio, i still have to figure out the cause. Yesterday i downloaded ICS 4.0.3 AOSP and found out that the audio driver source code required by android to use the ALSA interface provided by the kernel for the xoom is provided. e could either use it, write a new one, or (preferably, we should use the binary that we were using in VC. I should explain why: The problem is the HDMI output of the tegra2. Android does not support the idea of separate displays and independant displays at the framework level. As you have seen, except for the youtube app, the android desktop is cloned by the hdmi output. The way this was implemented is by a slightly modified gralloc (the one that we are using right now) and the tegra_alsa hw driver that was used in VC. When an HDMI plug is detected, then the gralloc clones the android desktop to the hdmi output by simply copying the displayed frame to both outputs. Similarly, the tegra2_alsa driver copies the audio output to both the ALSA device (the internal sound card) and the HDMI output. If we don't use the tegra2_alsa driver, we won't have audio through the HDMI port :( -- Unless we add specific code to handle this cloning to our own version... That would require to mess with the Nvidia propietary APIs ... As far as i have investigated the issue, it should be perfectly possible to use the tegra_alsa driver we were using in VC, and ICS has support to load it :) --- At least, that is the info i was able to gather until now :) I guess this is for information only and may be useful and may not but on the nvidia git this project has some work for the 3.0 kernel, seems to have some work for tegra20 (unlike previous post from billybobjoe back on the 22nd Nov which linked to the chromeos git) this may be of some use or at least an indication of changes for future kernel:- tegra linux 3 kernel What may be of more use with regards to sound are the source for tegra_alc5632 here:- tegra alc 5632 asoc driver code And in the sound/soc/codecs folder there are codecs for alc5623 and alc5632, I know we use alc5624 but some details here may be of use if you have not seen before:- Link to codecs folder I guess this would have been helpful when you created all the shuttle kernel files probably saved alot of time, only table of contents unless you know a registered dev:- Tegra 2 Tech Ref Manual Edited December 23, 2011 by brucelee666
Guest ejtagle Posted December 23, 2011 Report Posted December 23, 2011 (edited) I guess this is for information only and may be useful and may not but on the nvidia git this project has some work for the 3.0 kernel, seems to have some work for tegra20 (unlike previous post from billybobjoe back on the 22nd Nov which linked to the chromeos git) this may be of some use or at least an indication of changes for future kernel:- tegra linux 3 kernel What may be of more use with regards to sound are the source for tegra_alc5632 here:- tegra alc 5632 asoc driver code And in the sound/soc/codecs folder there are codecs for alc5623 and alc5632, I know we use alc5624 but some details here may be of use if you have not seen before:- Link to codecs folder I guess this would have been helpful when you created all the shuttle kernel files probably saved alot of time, only table of contents unless you know a registered dev:- Tegra 2 Tech Ref Manual Hi, i think an explanation on the sound issues is in order. At the kernel level, we have working drivers for the audio part of the Shuttle. This means, we have a codec driver for the alc5624 (it is the one we used in the 2.6.36 kernel, but ported to the 2.6.39) ... And we also have the glue code to link the i2s tegra interface to the codec. I have personally measured that when we send digital audio thru the ALSA interface, the data is actually output and reaches the ALC5624 codec. And i have also debugged the codec driver: The codec is dectected and properly programmed, and answers all queries , so i guess audio should be output... But it is not. I do suspect that perhaps a problem in the voltage regulators (some regulators could be disabled and not powering the audio amplifier)... I have at hand instrumentation to measure that.. It is just that i didn't have time to do the actual measures... ;) But, be sure i will take a look at the links you supplied.. Something should be missing compared to the 2.6.36, otherwise, audio should be heard ;) Edited December 23, 2011 by ejtagle
Guest ejtagle Posted December 24, 2011 Report Posted December 24, 2011 The good news is that i have working USB host mode :) -- The only thing missing is audio now ...
Guest Cass67 Posted December 24, 2011 Report Posted December 24, 2011 The good news is that i have working USB host mode :) -- The only thing missing is audio now ... Good job your keeping track of this stuff, i completely forgot about usb host :) Cass
Guest ejtagle Posted December 24, 2011 Report Posted December 24, 2011 Yay! ...! Sound working, at least , at kernel level and ALSA level! ... This means that all things pending are only userspace level things, much easier to debug ;) Attached the latest patch against android-nvidia-2.6.39. A quick note> To fix usb host mode, you need to pass as part of the kernel command line usbcore.old_scheme_first=1 That's all! Merry christmas to all! Eduardopatch2.6.39_final.rar
Guest Cass67 Posted December 24, 2011 Report Posted December 24, 2011 (edited) Excellent work Eduardo. Thanks a lot... Have a great Christmas, well deserved :) edit :- does not work out the box, pity ... no more time tonight to figure out what the end user stuff should be looking too ... ill work in over the next few days if i get a moment ... i suspect the audio source in the device tree is wrong .. and the hc lib does not work in the short time i played .. 10 mins :) ... Cheers Cass Edited December 24, 2011 by Cass67
Guest ejtagle Posted December 26, 2011 Report Posted December 26, 2011 Well, i ve been investigating the audio issues, and why android is unable to reproduce sound, even if the kernel ALSA sound subsystem is working... Eventually, i found out that the alsa_tegra module we were using in VC would not work in ICS, as it is depending on some functions not exported anymore by the android subsystem ... And also depends on libalsa. So, the only way we have to make audio work is to rewrite a new library for it. That is exactly what it is attached. You must copy the source in the same place as you copied the shuttle target files i provided for the ICS AOSP. You will have to replace the .mk and the audio_hw.c and rebuild the audio.primary.shuttle module Then, do in the device: rm /system/lib/hw/audio.primary..*.so and copy the compiled module to /system/lib/hw/ Remember the naming convention. If you are using another board name, the module must be renamed. You will also need the libtinyalsa.so and libaudioutils.so and their dependencies. Those libraries will also be built by the ICS build system Attached, as a convenient thing, also the compiled module At least , it allows ICS to output audio for me. Untested are the audio capture (microphone), but the code is there. Also untested the HDMI audio output (don-t ;know if it will or not work) Regards Eduardoaudio.raraudio.primary.Shuttle.rar
Guest Cass67 Posted December 26, 2011 Report Posted December 26, 2011 Well, i ve been investigating the audio issues, and why android is unable to reproduce sound, even if the kernel ALSA sound subsystem is working... Eventually, i found out that the alsa_tegra module we were using in VC would not work in ICS, as it is depending on some functions not exported anymore by the android subsystem ... And also depends on libalsa. So, the only way we have to make audio work is to rewrite a new library for it. That is exactly what it is attached. You must copy the source in the same place as you copied the shuttle target files i provided for the ICS AOSP. You will have to replace the .mk and the audio_hw.c and rebuild the audio.primary.shuttle module Then, do in the device: rm /system/lib/hw/audio.primary..*.so and copy the compiled module to /system/lib/hw/ Remember the naming convention. If you are using another board name, the module must be renamed. You will also need the libtinyalsa.so and libaudioutils.so and their dependencies. Those libraries will also be built by the ICS build system Attached, as a convenient thing, also the compiled module At least , it allows ICS to output audio for me. Untested are the audio capture (microphone), but the code is there. Also untested the HDMI audio output (don-t ;know if it will or not work) Regards Eduardo Still does not work for me ... ill probably recompile ICS again to be sure ive not broken something elsewhere with my tinkering ... but i would have expected mm in audio to be enough .. i have already all those other deps met so im sure its not that ... just don't have time today to look at it ... maybe later tonight when i get back home... Thanks Cass
Guest ejtagle Posted December 26, 2011 Report Posted December 26, 2011 Still does not work for me ... ill probably recompile ICS again to be sure ive not broken something elsewhere with my tinkering ... but i would have expected mm in audio to be enough .. i have already all those other deps met so im sure its not that ... just don't have time today to look at it ... maybe later tonight when i get back home... Thanks Cass The andoroid log will tell you if it is properly loading the driver (audio.primary.Shuttle.so) as the 1st and default driver, and also will tell you if any problems were detected .. ;)
Guest Cass67 Posted December 26, 2011 Report Posted December 26, 2011 The andoroid log will tell you if it is properly loading the driver (audio.primary.Shuttle.so) as the 1st and default driver, and also will tell you if any problems were detected .. Yeah it does load it OK, seems the issue is in the media framework somewhere, that's where the errors are.. not on the system to show exactly where just now :) The lib is named tegra btw not shuttle any more for me..
Guest ejtagle Posted December 26, 2011 Report Posted December 26, 2011 Yeah it does load it OK, seems the issue is in the media framework somewhere, that's where the errors are.. not on the system to show exactly where just now :) The lib is named tegra btw not shuttle any more for me.. Well, i am using the ics image you posted previously, based on 4.0.1, and audio seems to work fine ;) --- I still have to compile an ICS image... I try to avoid that as much as possible, cause it takes took long ;)
Guest Cass67 Posted December 26, 2011 Report Posted December 26, 2011 (edited) Yeah, 2 possibilities, audio is chnaged in 4.0.3 or I have mixed libs somewhere breaking it, every possibility of this one as I was messing with libmedia and others when attempting to get the a500 audio stuff working ... Won't know what I did until I can get tome in front of the KB later.. :) edit :- Works ... i was missing the audio_policy.tegra.so lib :) nice one !! Now to figure out why hd videos on youtube fail ... standard are fine .. hd not so much .... Looks like some omx issues, probably something silly ... Then Camera .. Cheers Cass Edited December 26, 2011 by Cass67
Guest ejtagle Posted December 27, 2011 Report Posted December 27, 2011 I suspect this is the problem with HD decoding... And OMX error (taken from log) E/OMXMaster( 106): OMX plugin failed w/ error 0x80001001 after registering 0 components
Guest ejtagle Posted December 27, 2011 Report Posted December 27, 2011 Small update on the audio driver: -Proper implementation of HDMI audio output. Did not have time to test it, but code should work. Under Tegra, the HDMI audio out seems to be using data written to the SPDIF port of the audio card. -Also added proper support for mic mute, and also added support to let android control the audio output, instead of relying on the kernel as it is done right now. Would like to know if audio input is working or not... Seems it is :)audio_v2.raraudio.primary.Shuttle.rar
Guest ejtagle Posted December 27, 2011 Report Posted December 27, 2011 (edited) libnvomx.so is not loading because there is a missing function called _ZN7android11AudioSystem9getOutputENS0_11stream_typeEjjjNS0_12output_flagsE That, demangled is android::AudioSystem::getOutput(android::AudioSystem::stream_type, unsigned int, unsigned int, unsigned int, android::AudioSystem::output_flags); This function was renamed to: _ZN7android11AudioSystem9getOutputE19audio_stream_type_tjjj27audio_policy_output_flags_t That, demangled is android::AudioSystem::getOutput(android::AudioSystem::audio_stream_type, unsigned int, unsigned int, unsigned int, android::AudioSystem::audio_policy_output_flags_t); The parameters are exactly the same ... but, the name change is preventing libnvomx to load Attached the source code of the libstagefrighthw ... This was reconstructed by inspecting the disassembled libstagefrighthw as supplied by nvidia, comparing it to a default implementation and making the required changes. The advantage of the one i attached is that i added some debugging aids, as for example, that logs if it was unable to load the library, instead of quietly sending undefined errors There are 2 ways to fix the OMX... 1) binary edit of the libnvomx.so to rename the function... a complex thing, as the new name is longer than the previous one 2) Add the missing function to the libmedia library... Quite possible, perhaps easier ;) 3) Try to use the google supplied hw acceleration libraries...libstagefrighthw.rar Edited December 27, 2011 by ejtagle
Guest Cass67 Posted December 27, 2011 Report Posted December 27, 2011 Small update on the audio driver: -Proper implementation of HDMI audio output. Did not have time to test it, but code should work. Under Tegra, the HDMI audio out seems to be using data written to the SPDIF port of the audio card. -Also added proper support for mic mute, and also added support to let android control the audio output, instead of relying on the kernel as it is done right now. Would like to know if audio input is working or not... Seems it is :) Tried audio input with soundhound ... seems to fail .... http://pastebin.com/yAFEM4Md device appears there ok ... crw-rw---- 1 1000 1005 116, 24 Dec 27 12:02 pcmC0D0c Sound output worked all along during this time ... Rgds Cass
Guest Cass67 Posted December 27, 2011 Report Posted December 27, 2011 libnvomx.so is not loading because there is a missing function called _ZN7android11AudioSystem9getOutputENS0_11stream_typeEjjjNS0_12output_flagsE That, demangled is android::AudioSystem::getOutput(android::AudioSystem::stream_type, unsigned int, unsigned int, unsigned int, android::AudioSystem::output_flags); This function was renamed to: _ZN7android11AudioSystem9getOutputE19audio_stream_type_tjjj27audio_policy_output_flags_t That, demangled is android::AudioSystem::getOutput(android::AudioSystem::audio_stream_type, unsigned int, unsigned int, unsigned int, android::AudioSystem::audio_policy_output_flags_t); The parameters are exactly the same ... but, the name change is preventing libnvomx to load Attached the source code of the libstagefrighthw ... This was reconstructed by inspecting the disassembled libstagefrighthw as supplied by nvidia, comparing it to a default implementation and making the required changes. The advantage of the one i attached is that i added some debugging aids, as for example, that logs if it was unable to load the library, instead of quietly sending undefined errors There are 2 ways to fix the OMX... 1) binary edit of the libnvomx.so to rename the function... a complex thing, as the new name is longer than the previous one 2) Add the missing function to the libmedia library... Quite possible, perhaps easier ;) 3) Try to use the google supplied hw acceleration libraries... Thanks for the lib, i have it installed and it does indeed complain about being unable to load libnvomx ... ill have a play today and see if i cant get some progress with the Google libs .... Rgds Cass
Guest ejtagle Posted December 27, 2011 Report Posted December 27, 2011 (edited) Thanks for the lib, i have it installed and it does indeed complain about being unable to load libnvomx ... ill have a play today and see if i cant get some progress with the Google libs .... Rgds Cass I guess that just adding the extra required function to libmedia.so would do the trick ;) -- Check AudioSystem.h log and you will see the change that was done ... Readding the missing function that just calls the new function i think that will be enough <div><br></div><div><br></div><div>Later i'll post an small patch for libmedia... Truth to be said, i'd really like to be able to use the goggle supplied libs, but every effort attempted has failed so far. Last time i tried, libraries loaded, but no display was shown on the screen ...</div> Edited December 27, 2011 by ejtagle
Guest ejtagle Posted December 27, 2011 Report Posted December 27, 2011 (edited) Tried audio input with soundhound ... seems to fail .... http://pastebin.com/yAFEM4Mddevice appears there ok ... crw-rw---- 1 1000 1005 116, 24 Dec 27 12:02 pcmC0D0cSound output worked all along during this time ... RgdsCassI have to admit i ve never seen this error before...E/audio_hw_primary( 98): cannot open pcm_in driver: cannot open device '/dev/snd/pcmC0D0c': Out of memoryOut of memory?Could this be perhaps a kernel compilation error ?<3>[ 204.668901] asoc: can't open platform tegra-pcm-audio D/audio_hw_primary( 98): check_input_parameters: rate:16000, format:1, count:1Perhaps the problem is that the output stream was opened using a 48000hz sampling rate, while the input stream was opened using a 16000hz sampling rate. The audio card of shuttle does not support simultanaeous playback and recording if not using the same sampling rate... Fortunately, we can "fix" this problem by an slight modification to our android sound driver ... ;)It would be interesting to try a program that just displays mic input and that does not out sound at the same time ;) Attached an attempt to fix it...audio_v3.rar Edited December 27, 2011 by ejtagle
Guest Cass67 Posted December 27, 2011 Report Posted December 27, 2011 I have to admit i ve never seen this error before...E/audio_hw_primary( 98): cannot open pcm_in driver: cannot open device '/dev/snd/pcmC0D0c': Out of memory Out of memory? Could this be perhaps a kernel compilation error ?<3>[ 204.668901] asoc: can't open platform tegra-pcm-audio D/audio_hw_primary( 98): check_input_parameters: rate:16000, format:1, count:1 Perhaps the problem is that the output stream was opened using a 48000hz sampling rate, while the input stream was opened using a 16000hz sampling rate. The audio card of shuttle does not support simultanaeous playback and recording if not using the same sampling rate... Fortunately, we can "fix" this problem by an slight modification to our android sound driver ... ;) It would be interesting to try a program that just displays mic input and that does not out sound at the same time ;) Attached an attempt to fix it... Not sure how it could be a kernel compilation problem as ive not changed anything in kernel and it compiled fine, without error .... using the sound recorder app from market place the mic appears to work as the needle moves on making sound but instead of a legible sound we get a really faint sort of buzzing noise on playback ..
Guest Cass67 Posted December 27, 2011 Report Posted December 27, 2011 I guess that just adding the extra required function to libmedia.so would do the trick ;) -- Check AudioSystem.h log and you will see the change that was done ... Readding the missing function that just calls the new function i think that will be enough <div><br></div><div><br></div><div>Later i'll post an small patch for libmedia... Truth to be said, i'd really like to be able to use the goggle supplied libs, but every effort attempted has failed so far. Last time i tried, libraries loaded, but no display was shown on the screen ...</div> yes, i have been that far too ... no display on screen .. its at that point i went down the rat hole of mixing and matching libs to no great effect :)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now