Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 do you mean I need to include 'usbcore.old_scheme_first=1' or is there more options I am missing? Is there a way of switching usb host on the fly after the system has booted? Yes, and yes... Mount sysfs and there there is an special file /usbbus/host , i think, can't exactly remember ) ... You can write a 0 or a 1 to that device and that switches the usb prot from/to host/slave on the fly..
Guest Scanno Posted July 23, 2012 Report Posted July 23, 2012 The mounting can be done at the ramdisk (init.rc) time... There is no expected partition layout on the Android framework side. The only things expected are that we must get the same filesystem structure (folders) ... I , sometime, thought on the idea to have just ONE big partition , only one, and throw everything in there. That would probably help alot on the bad nand block issues, as it allows the yaffs2 filesystem to find replacement blocks from nearly everywhere in the nand chip. Remember that yaffs2 can“t take good blocks from a different partition than the one a bad block was found... I was thinking of the boot and system partition on nand. Cache and data on sdcard. To prevent the hassle of creating partitions for inexperienced users, i thought user the main partition/fat filesystem to create files that contain the cache and data partitions. These partitions could be created at first boot if they are not there yet. But it would mean some extra overhead because they are not real partitions... Perhaps i am dreaming
Guest rvdgeer Posted July 23, 2012 Report Posted July 23, 2012 I was thinking of the boot and system partition on nand. Cache and data on sdcard. To prevent the hassle of creating partitions for inexperienced users, i thought user the main partition/fat filesystem to create files that contain the cache and data partitions. These partitions could be created at first boot if they are not there yet. But it would mean some extra overhead because they are not real partitions... Perhaps i am dreaming Could M2SD (Mount to SD) play a role in that? See here: http://forum.xda-developers.com/showthread.php?t=1342387
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 I was thinking of the boot and system partition on nand. Cache and data on sdcard. To prevent the hassle of creating partitions for inexperienced users, i thought user the main partition/fat filesystem to create files that contain the cache and data partitions. These partitions could be created at first boot if they are not there yet. But it would mean some extra overhead because they are not real partitions... Perhaps i am dreaming I don't know if it is a good idea... That would make the usage without an inserted SD card impossible... Using the SD as a data partition is better left to link2sd ... The nand bad blocks are not a problem if enough space is left free on a partition ... (about 10% of the partition size should be left free , otherwise, there are not enough free good nand blocks to replace bad blocks...
Guest Scanno Posted July 23, 2012 Report Posted July 23, 2012 (edited) I don't know if it is a good idea... That would make the usage without an inserted SD card impossible... Using the SD as a data partition is better left to link2sd ... The nand bad blocks are not a problem if enough space is left free on a partition ... (about 10% of the partition size should be left free , otherwise, there are not enough free good nand blocks to replace bad blocks... That is true.. But link2sd has also its problems. With jellybean android thinks that the dex files are missing and applications fail to launch. When you reboot the dex files are created again on the data partition. Every solution has a downside. You could make a smaller data partition for the system info storage and remount the data/app etc .. Edited July 23, 2012 by Scanno
Guest Scanno Posted July 23, 2012 Report Posted July 23, 2012 (edited) Eduardo, Second try at the kernel also nothing.... just gets into a bootloop before adb is active..... so i cannot get any info. Question an it be that the bootloop is because i do not have android build with the audo_hw.c included... EDIT: Nope no difference... cannot get it to boot with the new audio patch EDIT1: Wait i guess i forget something EDIT2: Nope wasn't that either.... Does not get to the android logo and not even an adb connection. Edited July 23, 2012 by Scanno
Guest grnunn Posted July 23, 2012 Report Posted July 23, 2012 Still working on audio input... Had to redo some parts of the audio driver, otherwise, it just does not work (or even worse, it crashes! ..) .. Hopefully this time it will work :) ...And trying to address the skype audio not working ... The problem was that skype wants to capture at 8khz, while playing back at 44100hz. That is unsupported by hw. So, a workaround in sw had to be implemented to downsample audio.. You could do it with AC97 but with single I2S you are stuck with the same sample rate for playback and record. Does android have an abstraction layer that will let you run the codec at 48k and them software sample rate convert to everything else? I think some other operating systems work that way. On the initialisation side of things... I think the "new" driver didnt produce audio until the first HP insert. Why do you think only one channel was being initialised ? The new driver seemed ok for channel set up although it was doing some interesting mucking about switching on one channel then the other to avoid pops and clicks.
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 (edited) That is true.. But link2sd has also its problems. With jellybean android thinks that the dex files are missing and applications fail to launch. When you reboot the dex files are created again on the data partition. Every solution has a downside. You could make a smaller data partition for the system info storage and remount the data/app etc .. There are ways to handle this problem... fused/overlaid filesystems come into mind... ;) Edited July 23, 2012 by ejtagle
Guest fosser2 Posted July 23, 2012 Report Posted July 23, 2012 For the Gtablet we're looking into creating a u-boot. That would reside on the nand portion and redirect everything to emmc. That way the bad block issues will not effect the rom. 16GB is much more to work with than the measily 512MB we have on our nand... Is this a logical solution, or is there a better approach we should be taking?
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 You could do it with AC97 but with single I2S you are stuck with the same sample rate for playback and record. Does android have an abstraction layer that will let you run the codec at 48k and them software sample rate convert to everything else? I think some other operating systems work that way. On the initialisation side of things... I think the "new" driver didnt produce audio until the first HP insert. Why do you think only one channel was being initialised ? The new driver seemed ok for channel set up although it was doing some interesting mucking about switching on one channel then the other to avoid pops and clicks. The latest audio_hw.c uses exactly that concept. It runs at 441.khz capture and playback, and lets the audioflinger handle resampling ... The codec initialization seems to be the problem... We write the right values to the right registers, but, some writes reach the codec when they can't be handled... For example, when no MCLK is sent to the codec, or when the codec is resetting...
Guest brucelee666 Posted July 23, 2012 Report Posted July 23, 2012 Eduardo, Been testing new audio fix and as Scanno has found boot loops caused. The only info I can give is it is a change to the alc5624 codec code that is causing the boot loop, I have booted a kernel with the new audio_hw.c and the tegra_alc5624 with an old codec and it booted (no audio but booted) also booted old audio kernel with new audio_hw for a test and still got sound via headphones.
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 For the Gtablet we're looking into creating a u-boot. That would reside on the nand portion and redirect everything to emmc. That way the bad block issues will not effect the rom. 16GB is much more to work with than the measily 512MB we have on our nand... Is this a logical solution, or is there a better approach we should be taking? You can just mount the emmc partitions from the ramdisk.. ;)
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 Eduardo, Been testing new audio fix and as Scanno has found boot loops caused. The only info I can give is it is a change to the alc5624 codec code that is causing the boot loop, I have booted a kernel with the new audio_hw.c and the tegra_alc5624 with an old codec and it booted (no audio but booted) also booted old audio kernel with new audio_hw for a test and still got sound via headphones. I will check tha alc5624.c .. The only thing that could be causing this is that i moved the codec initialization to the codec_probe from the i2c client probe... Bruce... Does the new audio_hw.c fix the audio capture issues ? ... Do you still get a crash when not switching video resolutions while attempting to playback youtube ? -- That were exactly the things addressed by the new audio_hw.c ..
Guest brucelee666 Posted July 23, 2012 Report Posted July 23, 2012 I will check tha alc5624.c .. The only thing that could be causing this is that i moved the codec initialization to the codec_probe from the i2c client probe... Bruce... Does the new audio_hw.c fix the audio capture issues ? ... Do you still get a crash when not switching video resolutions while attempting to playback youtube ? -- That were exactly the things addressed by the new audio_hw.c .. Eduardo, Quick answer I don't have time for much else just now is no it does not fix mic or youtube issues - will try to get log info later tonight. Mic just opens then closes in a second app saying unable to hear anything where as before it would stay open, youtube was no change crashed if you let browser video play but played fine if you changed video res at start (this is on old kernel audio codec/driver).
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 brucelee, whap app are you using to test the mic ? ... I will try to reproduce to problem so i can fix it ;)
Guest grnunn Posted July 23, 2012 Report Posted July 23, 2012 The latest audio_hw.c uses exactly that concept. It runs at 441.khz capture and playback, and lets the audioflinger handle resampling ... The codec initialization seems to be the problem... We write the right values to the right registers, but, some writes reach the codec when they can't be handled... For example, when no MCLK is sent to the codec, or when the codec is resetting... Codec reset I can believe, Mclk shouldn't have any effect. The only issue i can think of is if the codec DSP is started before the path, DSP or clocking is fully configured. How is the codec reset implemented?
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 (edited) Codec reset I can believe, Mclk shouldn't have any effect. The only issue i can think of is if the codec DSP is started before the path, DSP or clocking is fully configured. How is the codec reset implemented? In the case of the alc5624, seems it requires MCLK to be able to process i2c commands... At least, it says so in the datasheet.. And i rememebr that when i was writing the codec driver, unless i supplied MCLK, the codec didn“t ack i2c transactions... Edited July 23, 2012 by ejtagle
Guest brucelee666 Posted July 23, 2012 Report Posted July 23, 2012 (edited) brucelee, whap app are you using to test the mic ? ... I will try to reproduce to problem so i can fix it ;) Eduardo, Re. mic my initial test as I was logging off (should have waited to test more before posting) was a voicesearch using new jb apk now that starts and stops with didn't catch that try speaking again where as with old audio_hw it sat at the initial screen like it was listening - attached 2 logs for this 1 is the new audio_hw and 2 is the old ver. This may just be a voicesearch issue as I have tried the new audio_hw with soundhound and it recognised the audio well enough via mic that it reported the correct song, also using easy voice recorder (I set it at 44100) it recorded my voice although a slight background noise (humming/static). - so from these 2 tests the mic is working.log1_mic666.txtlog2_mic666.txt Edited July 23, 2012 by brucelee666
Guest grnunn Posted July 23, 2012 Report Posted July 23, 2012 In the case of the alc5624, seems it requires MCLK to be able to process i2c commands... At least, it says so in the datasheet.. And i rememebr that when i was writing the codec driver, unless i supplied MCLK, the codec didn“t ack i2c transactions... Ok I see the note, not seen that on an i2c codec before. The alc5624 looks like an ac97 codec with the ac97 replaced with i2c and i2s. AC97 always has an mclk so i suspect it is a "hangover" from that. Sorry for the distraction!
Guest ejtagle Posted July 23, 2012 Report Posted July 23, 2012 Eduardo, Re. mic my initial test as I was logging off (should have waited to test more before posting) was a voicesearch using new jb apk now that starts and stops with didn't catch that try speaking again where as with old audio_hw it sat at the initial screen like it was listening - attached 2 logs for this 1 is the new audio_hw and 2 is the old ver. This may just be a voicesearch issue as I have tried the new audio_hw with soundhound and it recognised the audio well enough via mic that it reported the correct song, also using easy voice recorder (I set it at 44100) it recorded my voice although a slight background noise (humming/static). - so from these 2 tests the mic is working. VoiceSearch seems to require 8khz mono audio, even if told to capture at other sampling rate. Guess we will have to implement a resampler (the previous audio_hw.c had it... but was crashing...)
Guest Daedric1383 Posted July 23, 2012 Report Posted July 23, 2012 I was thinking of the boot and system partition on nand. Cache and data on sdcard. To prevent the hassle of creating partitions for inexperienced users, i thought user the main partition/fat filesystem to create files that contain the cache and data partitions. These partitions could be created at first boot if they are not there yet. But it would mean some extra overhead because they are not real partitions... Perhaps i am dreaming Do not go down this route. IF /data is loop mounted of a file on /sdcard, you can forget USB Mass Storage. This was true back in the days of SD Card Boot with HTC Kaiser on cupcake. We either partitioned the sdcard, or we kissed UMS goodbye. Regarding the hassle of partitioning the sdcard, even CWM does it for us :)
Guest brucelee666 Posted July 23, 2012 Report Posted July 23, 2012 (edited) Eduardo, For further info just done a test call on skype and got a lovely female voice speaking to me asking to a record a message which I did and she kindly played it back to me :) . Both messages played back via headphones as you would expect to hear, no slow robot sounding audio as per previous ver. your fix for this seems to work prefectly Edited July 23, 2012 by brucelee666
Guest ejtagle Posted July 24, 2012 Report Posted July 24, 2012 (edited) Well, i found the problem with google voice... Seems it refuses to accept sample rates different from the one that it specifies when starting to digitize sound (8khz). AudioFlinger has a built in resampler, but it is unable to convert from 44.1khz to 8khz, The solution was to implement a very basic resampler that downconverts the 44.1khz to 11.025khz. Then audioflinger will do the rest, downconverting to 8khz. Of course, this is only done for 8khz sampling. Any program trying to get 44.1khz will get it. Attached the fixed audio_hw.c Tomorrow i will start debugging the audio codec issue ;) - Today i ran out of time ... :Saudio-24jul.rar Edited July 24, 2012 by ejtagle
Guest Scanno Posted July 24, 2012 Report Posted July 24, 2012 Do not go down this route. IF /data is loop mounted of a file on /sdcard, you can forget USB Mass Storage. This was true back in the days of SD Card Boot with HTC Kaiser on cupcake. We either partitioned the sdcard, or we kissed UMS goodbye. Regarding the hassle of partitioning the sdcard, even CWM does it for us :) That is why we have MTP now ;)
Guest Scanno Posted July 24, 2012 Report Posted July 24, 2012 Eduardo, For further info just done a test call on skype and got a lovely female voice speaking to me asking to a record a message which I did and she kindly played it back to me :) . Both messages played back via headphones as you would expect to hear, no slow robot sounding audio as per previous ver. your fix for this seems to work prefectly Confirmed
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now