[CONFIRMED] Inspire 4G 'Tinny' Audio Fix

Search This thread

TurboniumX

Senior Member
Feb 27, 2011
52
84
AR
TurboniumX Inspire Audio Fix
Confirmed working! Returns tinny audio to stock quality.

I have only tested with CM7, however it has been reported to work on other ROMs. Please make a backup before attempting this.

I've attached a ZIP that can be flashed from ClockworkMod. All you need to do is take a backup, then flash the ZIP. If it works for you, feel free to buy me a beer! :)

Original post follows:

I think I may have fixed the tinny sound issue on my Inspire (at least it sounds good to me now). I need someone else to test it though since I only have the one device and only a few people willing to talk to me 10 times in a row. Don't get your hopes up!

In the /system/etc/soundimage directory on a stock ROM there are several files that end in "_MCLK.txt". I pushed these files with adb to /system/etc/soundimage on my Inspire 4G running CM7 nightly build 8 with the Inspire kernel provided over at CM's site. I used Stock_Inspire4G_Rooted_r34p3rex_v01.zip as my "stock ROM".

Then I copied the /system/etc/CodecDSPID_MCLK.txt file from the stock ROM to my device and overwrote the /system/etc/CodecDSPID.txt file. Reboot and it appears to have eliminated the tinny sound for me.

Can someone test this and see if it fixes the issue for you? You'll need to get the files from a stock ROM since I can't post download links yet. Here are some instructions:

Make sure the phone is in USB Debug Mode.

Code:
adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p25 /system
adb push Sound_Bass_Booster_MCLK.txt /system/etc/soundimage/
{repeat above line for each file that starts with 'Sound', should be 27 of them}
adb push CodecDSPID_MCLK.txt /system/etc/
adb shell mv /system/etc/CodecDSPID.txt /system/etc/CodecDSPID.orig
adb shell mv /system/etc/CodecDSPID_MCLK.txt /system/etc/CodecDSPID.txt

Then reboot.
 

Attachments

  • cm7-inspire-audiofix-r1.zip
    570.1 KB · Views: 17,405
Last edited:

zswielder

Senior Member
Feb 25, 2011
620
67
Hi,

Just one question for clarification.

This fixes issues caused by using Custom ROMs?

What about the low sound volume in general on untouched Inspire 4G?
 

TurboniumX

Senior Member
Feb 27, 2011
52
84
AR
The below is all fixed in the ZIP in the OP. Disregard.

I had an interesting problem with my method in the OP. After renaming CodecDSPID_MCLK.txt to CodecDSPID.txt and rebooting, there would be no sound from any application except the phone until after placing a phone call. The phone call sounded great, and then the other sound apps would work fine.

I did some more digging and it looks like the following change is needed to the CodecDSPID_MCLK.txt before renaming it. Add the following line to the bottom of the file:

Code:
Recording,/system/etc/soundimage/Sound_Original_MCLK.txt

After this, sound seems to work immediately after reboot. I've checked it two or three times now and it still seems to sound great. Phone calls sound like stock now IMO.
 
Last edited:

cursordroid

Senior Member
Jul 20, 2009
1,181
15
Edmonton
I can vouch for the call quality. It's back up to stock quality again!
And, in general, the audio quality for system alerts is the same as stock, although this wasn't that bad in the first place.
Anyone else want to try and post results?
Nandroid backup first through Clockwork Recovery, just to be safe. I did. :)

By the way, tested with CM7 Nightly #8, with the kernel from CyanogenMod forum.
 
Last edited:
  • Like
Reactions: TurboniumX

mudknot2005

Senior Member
Feb 23, 2011
1,278
260
Corsicana, Tx
I thought Android Revolution didn't have the tinny sound problem because it was based on the stock ROM? In any case, you can try it -- I doubt it will cause problems but I'd take a backup using your favorite tool beforehand just in case!

For some reason I am still experiencing some tinny in call sound, I believe others are too. I'm backing up right now so I'll let you know how it goes.

update: holy sheep poo batman IT WORKS MANY MANY THANKS, mind if I link to this in the android revolution thread?
 
Last edited:

awtryau89

Senior Member
Nov 25, 2008
440
62
Wow!!! I hope its not placebo. Mine sounds much better too. Can't remember stock sound but its definitely better than a call I just made to voicemail before installing. Devs need to cook thins into all kernels now.
 

dgrooman

Member
Dec 9, 2007
42
1
will this work on afr003 rom?

Am a noob to android so please forgive the basic question. But will this fix work on the dhd-afr003 rom and if so exactly how do I go about installing it?
Thanks
 

TurboniumX

Senior Member
Feb 27, 2011
52
84
AR
Am a noob to android so please forgive the basic question. But will this fix work on the dhd-afr003 rom and if so exactly how do I go about installing it?
Thanks

You just flash the zip from ClockworkMod like you do any other ROMs and kernels. There are many resources on the Internet (most of them on these forums) that can help you better than I could.
 
  • Like
Reactions: laxwillsch

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    TurboniumX Inspire Audio Fix
    Confirmed working! Returns tinny audio to stock quality.

    I have only tested with CM7, however it has been reported to work on other ROMs. Please make a backup before attempting this.

    I've attached a ZIP that can be flashed from ClockworkMod. All you need to do is take a backup, then flash the ZIP. If it works for you, feel free to buy me a beer! :)

    Original post follows:

    I think I may have fixed the tinny sound issue on my Inspire (at least it sounds good to me now). I need someone else to test it though since I only have the one device and only a few people willing to talk to me 10 times in a row. Don't get your hopes up!

    In the /system/etc/soundimage directory on a stock ROM there are several files that end in "_MCLK.txt". I pushed these files with adb to /system/etc/soundimage on my Inspire 4G running CM7 nightly build 8 with the Inspire kernel provided over at CM's site. I used Stock_Inspire4G_Rooted_r34p3rex_v01.zip as my "stock ROM".

    Then I copied the /system/etc/CodecDSPID_MCLK.txt file from the stock ROM to my device and overwrote the /system/etc/CodecDSPID.txt file. Reboot and it appears to have eliminated the tinny sound for me.

    Can someone test this and see if it fixes the issue for you? You'll need to get the files from a stock ROM since I can't post download links yet. Here are some instructions:

    Make sure the phone is in USB Debug Mode.

    Code:
    adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p25 /system
    adb push Sound_Bass_Booster_MCLK.txt /system/etc/soundimage/
    {repeat above line for each file that starts with 'Sound', should be 27 of them}
    adb push CodecDSPID_MCLK.txt /system/etc/
    adb shell mv /system/etc/CodecDSPID.txt /system/etc/CodecDSPID.orig
    adb shell mv /system/etc/CodecDSPID_MCLK.txt /system/etc/CodecDSPID.txt

    Then reboot.
    4
    MCLK Kernel references

    Sorry, I've been quiet today while I look a bit deeper into how all of this works. I found some code in the new audio source provided in the HTC stock kernel source for the Inspire:

    From arch/arm/mach-msm/board-spade-audio.c:
    Code:
    int spade_support_back_mic(void)
    {
    #ifdef CONFIG_HTC_VOICE_DUALMIC
            /* the flag is only enabled by ATT config file */
            return 1;
    #else
            return 0;
    #endif
    }
    
    void spade_get_acoustic_tables(struct acoustic_tables *tb)
    {
            pr_info("%s: system_rev %d", __func__, system_rev);
            if (system_rev < 4) {
                    /* the stage before XE board */
                    strcpy(tb->aic3254,
                                    "AIC3254_REG_XD.csv");
            } else if (system_rev > 5) {
                    /* configuration that main clock of A3254 comes from MCLK */
                    strcpy(tb->aic3254_dsp, "CodecDSPID_MCLK.txt");
                    strcpy(tb->aic3254,
                                    "AIC3254_REG_DualMic_MCLK.csv");
            }
    }

    So it looks like the new kernel checks the hardware and loads the sound processing config out of the original filename (v1 just overwrites the CodecDSPID.txt with the contents of the MCLK file). It also looks like we're missing a couple of other register files from the stock build for this hardware. These REG files appear to be necessary to support dual-mic audio profiles given their contents and the code above.

    From the looks of it, the stock HTC kernel relies on a flag, CONFIG_HTC_VOICE_DUALMIC, to enable dual-mic support. The flag is set in /arch/arm/configs/ace-att_defconfig:

    Code:
    CONFIG_HTC_VOICE_DUALMIC=y

    However, this flag is not set in the CM7 kernel source. From this, I'd bet we're not getting dual-mic support on the Inspire devices once we flash over the stock kernel. Can someone with some experience building kernels try adding this flag and rebuilding to see if it improves mic quality?



    Edit: I got confirmation from Kali (who does the CM7 ace kernel) that the dual-mic functionality is not enabled for Inspire users because it breaks users running the Desire.
    Looks like we may need separate kernels for a while until this gets sorted out.
    2
    This fixes issues caused by using Custom ROMs?

    What about the low sound volume in general on untouched Inspire 4G?

    I think it fixes at least the tinny sound during phone calls. I couldn't tell you about low sound volume, I never noticed it before.
    2
    The below is all fixed in the ZIP in the OP. Disregard.

    I had an interesting problem with my method in the OP. After renaming CodecDSPID_MCLK.txt to CodecDSPID.txt and rebooting, there would be no sound from any application except the phone until after placing a phone call. The phone call sounded great, and then the other sound apps would work fine.

    I did some more digging and it looks like the following change is needed to the CodecDSPID_MCLK.txt before renaming it. Add the following line to the bottom of the file:

    Code:
    Recording,/system/etc/soundimage/Sound_Original_MCLK.txt

    After this, sound seems to work immediately after reboot. I've checked it two or three times now and it still seems to sound great. Phone calls sound like stock now IMO.
    2
    will this work on android revolution? if so I'll flash it and test..

    I thought Android Revolution didn't have the tinny sound problem because it was based on the stock ROM? In any case, you can try it -- I doubt it will cause problems but I'd take a backup using your favorite tool beforehand just in case!