Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. Thread Author  Thread Author    #1  

    Default [HOW-TO] Downmix stereo to mono and boost volume for the internal Nook Color speaker!

    I really love my Nook Color.
    I currently am running it with Nookie Froyo installed to the eMMC by following the directions found here.

    Its fantastic and so far I found nothing that it can't do. It runs flawlessly.
    My only gripe was the sound.
    There are two issues as you probably know.
    1) Low volume
    2) The built in speaker is mono and only outputs one channel (left I believe)

    So after trying a few things, I finally found a way to downmix stereo to mono and boost the volume a bunch. Now music is fantastic, louder and I hear both left and right channels as well!

    The solution was in ALSA's asound.conf. It took me a little to figure out the best method and here is what I did.
    FYI: I also have just a volume boosted version that does not downmix explained later as well.

    First off, if you decide to do this, I take no responsibility for any possible damage to your Nook Color's internal speaker.

    OK, that's out of the way, so here we go...

    To do this you will need a working ADB setup or Root Explorer and a text editor.
    I used ADB, so I will explain how to do this via that method.
    You will of course need to be rooted.
    I only tested this on my Nookie Froyo, but I see no reason why this won't work on any rooted setup since it is an ALSA tweak.

    First off, fire up your favorite text editor and create a new asound.conf containing:
    ########################################

    ctl.AndroidOut {
    type hw
    card 0
    }

    ctl.AndroidIn {
    type hw
    card 0
    }

    pcm.nook{
    type hw
    card 0
    device 0
    }

    pcm.!default {
    type route
    slave.pcm nook
    slave.channels 2
    ttable.0.0 20
    ttable.0.1 20
    ttable.1.0 20
    ttable.1.1 20
    }

    ########################################
    Now save it as C:\asound.conf (or whereever you want).
    Make sure your text editor doesn't save it as asound.conf.txt. If it does you will need to remove the txt part before or after moving it to your Nook.

    Next, backup your original asound.conf file (just in case)
    ########################################
    adb shell
    mount -o remount,rw /system
    cp /system/etc/asound.conf /system/etc/asound.conf.original
    mount -o remount,ro /system
    exit

    ########################################

    Now copy your new asound.conf file over to your Nook Color
    ########################################
    adb mount -o remount,rw /system
    adb push c:\asound.conf /system/etc/asound.conf
    adb shell mount -o remount,ro /system
    ########################################

    I would also suggest copying it over to your Nook as a second copy as this:
    ########################################
    adb shell mount -o remount,rw /system
    adb push c:\asound.conf /system/etc/asound.conf.downmixed
    adb shell mount -o remount,ro /system
    ########################################

    This is useful for switching back and forth as needed. i.e., if you are going to be running your Nook using headphones or to a receiver or speaker system and want to have true left and right stereo.

    You now should have three asound.conf files as so:
    asound.conf
    asound.conf.original
    asound.conf.downmixed

    You can easily rename the files when needed.

    YOU MUST REBOOT after you change the asound.conf file in order to have the changes take effect! I haven't found a way to restart ALSA on the Nook short of the reboot. If anyone knows how to restart alsa on the Nook, please let me know.

    Ok, you can also mix it up a little and modify the stock asound.conf to boost the volume and keep the left and right mappings.
    To do that, create a new asound.conf file containing:
    ########################################
    ctl.AndroidOut {
    type hw
    card 0
    }

    ctl.AndroidIn {
    type hw
    card 0
    }

    pcm.nook{
    type hw
    card 0
    device 0
    }

    pcm.!default {
    type route
    slave.pcm nook
    slave.channels 2
    ttable.0.0 20
    ttable.1.1 20
    }

    ########################################
    I would save this file as asound.conf.boostedstereo or something easily identifiable.

    Copy it over to the Nook as earlier done for the other files, but I would keep it named like that:
    ########################################
    adb push c:\asound.conf.boostedstreo /system/etc/asound.conf.boostedstreo
    ########################################

    Now to spice it up, you can use something like gscript to help you write a shell script to change the running asound files back and forth like so...
    This one will move the downmixed one to be used:
    ########################################
    mount -o remount,rw /system
    cp /system/etc/asound.conf /system/etc/asound.conf.backup
    cp /system/etc/asound.conf.downmixed /system/etc/asound.conf
    mount -o remount,ro /system
    reboot

    ########################################

    This one will move the boosted stereo one to be used:
    ########################################
    mount -o remount,rw /system
    cp /system/etc/asound.conf /system/etc/asound.conf.backup
    cp /system/etc/asound.conf.boostedstereo /system/etc/asound.conf
    mount -o remount,ro /system
    reboot

    ########################################

    You get the idea.

    You can also do this in the terminal or via adb.
    I use both depending on what is going on since I seem to be batting 20% or so using gscript for some reason. It only works once in a while and I am at a loss. I will delve into it deeper later.
    For me, for now, I don't use the headphone jack. The new downmixed stereo to mono plus the increaed volume now allows me to hear Pandora or my MP3s in the shower without my battery powered speakers. One less battery consuming device and less wires!! YAY!

    The jack will come into play when I move this into the car as a replacement for my UMPC carputer once reliable bluetooth arrives so I can hook up to my car's ECU which is the final missing piece of the puzzle.

    Anyway, if anyone knows why gscript might be crapping out on my shell script, let me know.

    If you try this, let me know if you have any issues.

    NOTE:
    For some strange reason the ttable mapping isn't working as expected.
    If you use the standard ttable.0.0 1 where 1 (I believe) should state full volume, or 100%, it doesn't work like that.
    If you change the value from 20 as I have used, you can tweak the volume higher or lower.
    I found 20 is the best for my MP3 files I tested since it had no distortion on some of my louder tracks. 30 definitely had distortion, but you might be able to tweak it up a tad more over 20.
    FWIW, 20 is great for Slipknot and everything else is just fine.


    You can also download the two asound.conf files if you prefer.
    You will need to rename according to your needs.
    RIGHT CLICK and SAVE AS or your browser's equivalent.
    asound.conf.downmixed
    asound.conf.boostedvolume
    Last edited by psybertech; 04-01-2011 at 02:11 PM. Reason: removed the chmod steps since they are not needed
    Thanked by 2:
  2. #2  
    azumak's Avatar

    Posts
    52 Posts
    Global Posts
    166 Global Posts
    ROM
    MIUI 1.6.24 - PoonKang479

    Default

    Wow, this is really cool! I don't have a NC yet, so I can't test it yet, but I'm sure this is something I'll be trying out!

    I'll likely be pairing my Yamaha bluetooth/wired combo speaker and want to try the stereo method, and possibly make some low-level tweaks myself (I'm very much an amateur coder and will stay that way, lol). There is a hardware defect while using bluetooth on my Yamaha that makes a super high-pitched whining sound that gets louder with volume, so if it boosted it before it went to the speaker that'd be great. Looking forward to it!
    -edit-
    I may or may not be using ADB, as I don't have room on my netbook (main PC ATM >.<) after a reformat for the Android SDK, as I'm a media junkie. I might have it installed by then. If I go without ADB I might do a mini-walkthrough for others that are interested but don't prefer ADB.
  3. #3  

    Default

    Are there simpler instructions to this. I really need to do something to the volume on my nook. I use it for movies and it's just horrendous.
  4. Thread Author  Thread Author    #4  

    Default

    This is as simple as I can make it:

    Download the asound.conf.downmixed to your C:\ drive.
    You will need adb to be working on your setup. If so, copy and paste the next 5 lines:
    adb shell mount -o remount,rw /system
    adb shell cp /system/etc/asound.conf /system/etc/asound.conf.original
    adb push c:\asound.conf.downmixed /system/etc/asound.conf
    adb shell chmod 644 /system/etc/asound.conf
    adb reboot

    You are all set now.

    If you ever want to go back to stock, copy paste these 5 lines to restore to stock:
    adb shell mount -o remount,rw /system
    adb shell cp /system/etc/asound.conf /system/etc/asound.conf.downmixed
    adb shell cp /system/etc/asound.conf.original /system/etc/asound.conf
    adb shell chmod 644 /system/etc/asound.conf
    adb reboot


    If I can figure out how to make a clockwordmod package, I will add that to the top post. I know how to make one, but I am not sure how to set permissions. Let me test some things and I will get that posted.
    For now, the 5 lines of code above after the download of the downmixed file will do ya.
  5. #5  

    Default

    hey I know voodoo sound will allow u to downmix to mono but I'm not for sure if it is fo when u use headphones or if it works for the speakers too. May want to check into that.
  6. #6  

    Default

    Quote Originally Posted by psybertech View Post
    This is as simple as I can make it:

    Download the asound.conf.downmixed to your C:\ drive.
    You will need adb to be working on your setup. If so, copy and paste the next 5 lines:
    adb shell mount -o remount,rw /system
    adb shell cp /system/etc/asound.conf /system/etc/asound.conf.original
    adb push c:\asound.conf.downmixed /system/etc/asound.conf
    adb shell chmod 644 /system/etc/asound.conf
    adb reboot

    You are all set now.
    That makes sense but when I issue the first command, I get:

    adb shell mount -o remount,rw /system
    Usage: mount [-r] [-w] [-o options] [-t type] device directory

    Looking at some other uses of adb, it appears that "device" should be of the form /dev/block/mmcblk0px, where x is the partition number. I tried this with several values of x, but I couldn't find any /system/etc/asound.conf file. Looking at /system with Root Explorer didn't show this file either.

    This is on a rooted stock NC. Will this procedure only work with Nookie Froyo?

    Does Eclair use something other than alsa for sound?
  7. Thread Author  Thread Author    #7  

    Default

    Quote Originally Posted by roberto View Post
    That makes sense but when I issue the first command, I get:

    adb shell mount -o remount,rw /system
    Usage: mount [-r] [-w] [-o options] [-t type] device directory

    Looking at some other uses of adb, it appears that "device" should be of the form /dev/block/mmcblk0px, where x is the partition number. I tried this with several values of x, but I couldn't find any /system/etc/asound.conf file. Looking at /system with Root Explorer didn't show this file either.

    This is on a rooted stock NC. Will this procedure only work with Nookie Froyo?

    Does Eclair use something other than alsa for sound?
    The mounting should work this way for eMMC based installs, so try this instead:
    adb shell mount -o rw,remount -t ext2 /dev/block/mtdblock05 /system
    adb shell cp /system/etc/asound.conf /system/etc/asound.conf.original
    adb push c:\asound.conf.downmixed /system/etc/asound.conf
    adb shell chmod 644 /system/etc/asound.conf
    adb reboot

    External SD card based installs I believe use:
    adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system

    but I am not 100% sure on that.

    As for the asound.conf file existing in Eclair, I honestly can't say since I am not on that anymore and I deleted all my older recovery points.
    Even if it does not exist, by placing the asound.conf file there it should work. From what I read briefly, Eclair should be using alsa. The asound.conf file found in etc should not be necessary for ALSA to work by default. It is used if it exists and if it doesn't it just works as specified in the main ALSA config file.
    If you don't have on in etc by default, the adb cp command above will fail, but that is fine.

    Sorry if it won't work on Eclair. Let me know if the above works or not.

    I am still going to work on an update.zip style installer once I get the time to figure out how to write the updater-script in the newer Edify manner for CWM v 3.0 and greater.
    Thanked by:
  8. #8  

    Default

    I had trouble that way also also, but figured out that I could upload the file using Dropbox. I did that and moved it to /system/etc/ with the correct permissions, using Root Explorer. The sound seems to be working fine, but it's hard to tell much difference (it is at least as loud as before, in any case). I'll try it with earplugs later and see if I can tell a difference. I am deaf in one ear, which is why this mod appealed to me).
  9. #9  

    Default

    an update.zip file sounds a lot easier. I've done what you instructed me to do but for some reason I'm doubting my success.
    running cm7 latest nightly using separate SD card for CWR.
  10. Thread Author  Thread Author    #10  

    Default

    roberto,

    I am curious to know if it really is working or not. On mine, it was a HUGE volume change... nothing small and very noticeable. What you describe makes me wonder if it is working or not.
    If you know any songs with definite left and right parts, I would try that. If you hear both, it worked, otherwise Eclair may not work the same.
    It may not be in your favorite genres of music, but I used Slayer's "South of Heaven" main intro as my test and the difference was night and day in volume and the fact I hear both guitar parts.

    hrrrmmmmmmmmmmm
  11. #11  

    Default

    I checked out the audio with headphones and it definitely is MUCH louder, so it really does the trick.

    Edit: I checked again with the speaker, using a file which I knew had fairly low volume before, even with the highest setting. It was much louder after installing the alsa.conf file (stock 2.1 Eclair, rooted).
    Last edited by roberto; 03-31-2011 at 02:46 PM.
  12. #12  

    Default

    I may have asked this already but Im running cm7 rc4 and I notice (thru root explorer) that asound.conf isnt in /system/etc. Does this mean that it wont work for me?
  13. Thread Author  Thread Author    #13  

    Default

    punchys,

    I don't know for sure. What I believe is that ALSA doesn't require that file to exist initially but if it does it will use it to offset the player's default behavior.
    Its worth a try and the result will be immediate if it works.

    If you try this, please let me know if it works or not so I can update the main post with either a go/no go on the specific build.
    Thanked by:
  14. #14  

    Default

    I just tried it using these commands:
    adb shell mount -o remount,rw /system
    adb shell cp /system/etc/asound.conf /system/etc/asound.conf.original
    adb push c:\asound.conf.downmixed /system/etc/asound.conf
    adb shell chmod 644 /system/etc/asound.conf
    adb reboot
    but before doing so I watched a little bit of tron legacy and listened to how loud it was on full volume. I then ran the process and then test volume again. I must say that it did increase volume noticeably, not by a whole lot but definitely noticeably. Im curious though was I right in using those commands and not the ones you gave Roberto on page one?
    Since Im using cm7 rc4 installed to the internal devices not an sd boot up.
  15. #15  

    Default

    Instead of a zip file how hard would it be to make an app that does this? I'm sure many other people would like the ability to switch between mono and stereo on the fly on any device whether through headphones, Bluetooth, or external speaker. Wonder if there would be a Dev who is familair with app making that we could suggest this too. That way instead of command lines and flashing zips it would be simplified. What ya think?
  16. #16  

    Default

    any possibility this will work with autonooter 3.0? That file is not in the etc directory.
  17. Thread Author  Thread Author    #17  

    Default

    To automate the switching is very simple using an application called gScript Lite.
    It allows for shell scripts to be used on Android.

    Install gScript and add a new script with the following and name it something like "Downmixed Sound" (check the box for needs SU):

    cp /system/etc/asound.conf.downmixed /system/etc/asound.conf
    stop media
    start media

    This will change to the downmixed/boosted volume configuration and restart the sound system without needing a reboot.

    You will need to have the asound.conf.downmixed file in /system/etc/ already, but once they are in there, it is great.

    You can even add a new shortcut to your home screen directly to a gscript lite script. It makes it just like you are opening a new app, but it just runs the script.
    I use scripts like these for various things and have the above scripts in a folder called audio on one of my home screens. In that folder there are three shortcuts, one for each possible asound.conf file. The contents of the other two are as follows.

    Here is what you would do to set it back to default (no idea why I would need this though)(check the box for needs SU):
    cp /system/etc/asound.conf.default /system/etc/asound.conf
    stop media
    start media


    Here is just boosted volume, no downmixing for headphones or speaker use (check the box for needs SU):

    cp /system/etc/asound.conf.boostedvolume /system/etc/asound.conf
    stop media
    start media


    As for an app to do this, for me this suits my needs and works just like an app for all intents and purposes.
    All you need to do is mount /system as rw, copy the original asound.conf file to asound.conf.default and then copy the two asound.conf files in the first thread to /system/etc.
    Once they are there the scripts automate the switch quickly and without the need for a reboot.


    Quote Originally Posted by tailleur View Post
    any possibility this will work with autonooter 3.0? That file is not in the etc directory.
    I believe it still should work. The only way to know for sure would be to test it out and let us know either way.
    Last edited by psybertech; 04-01-2011 at 02:08 PM. Reason: a few typos and an answer to a quesiton I missed initially
  18. #18  

    Default

    wow thanks i'll have to give it a try now since u just explained it so easy and quick sounding too

    ok i am running cm7 and coming across the issue the other guy on here had before of no asound.conf file being present. i would like the ability to be able to switch back and forth from stereo(default) to mono so i could have the stereo in my headphones and mono on the nook. does anybody have the default file they could send me or is there another command i can run in gscript to get me back to default?

    ok update on what i have done
    downloaded the asound.conf.downmix and it worked great to give me mono on my nook. now i need the original asound.conf file to get it back to stereo for when i plug in headphones or speakers to it. once i have that i will test it and let you guys know what i found but so far on cm7 i was able to downmix to mono.
    Last edited by jbuggydroid; 04-01-2011 at 10:57 PM.
  19. #19  

    Default

    Quote Originally Posted by jbuggydroid View Post
    wow thanks i'll have to give it a try now since u just explained it so easy and quick sounding too

    ok i am running cm7 and coming across the issue the other guy on here had before of no asound.conf file being present. i would like the ability to be able to switch back and forth from stereo(default) to mono so i could have the stereo in my headphones and mono on the nook. does anybody have the default file they could send me or is there another command i can run in gscript to get me back to default?

    ok update on what i have done
    downloaded the asound.conf.downmix and it worked great to give me mono on my nook. now i need the original asound.conf file to get it back to stereo for when i plug in headphones or speakers to it. once i have that i will test it and let you guys know what i found but so far on cm7 i was able to downmix to mono.
    In post #1 of this thread there are two scripts, one for mono and another for stereo. You could switch between those two.
  20. #20  

    Default

    So the boosted volume one will return it back to stereo? Or do I need to create the first script outlined in post 1?
  21. #21  

    Default

    The first script will give mono with boosted volume and the second one give stereo with boosted volume.
  22. Thread Author  Thread Author    #22  

    Default

    Quote Originally Posted by jbuggydroid View Post
    So the boosted volume one will return it back to stereo? Or do I need to create the first script outlined in post 1?
    The boosted volume returns it to stock with just the volume increased. The internal speaker reverts to mono and when a jack is plugged in, it will run in stereo in the speakers or headphones but a bit louder.

    ---
    As it stands now, I might clean up and re-do the main post. I love to explain what I found, what to do and even further, try to explain what is going on in anything I ever post anywhere for those that are curious and might want to change or improve on things. Unfortunately I tend to run on and on and sometimes it makes my posts a little confusing overall...... even for me.

    With that being said, the initial post on how to do this could be as simple as download the two files (plus I should post a copy of the default one), copy everything to your SD card, mount system as rw using Root explorer and then copy to /system/etc/ using root explorer.
    To switch I could just post the three .sh files for use in gscript and a quick how to add them to and use gscript.

    If I can get the updater-script to work with an update.zip style installer, it will certainly make the how to very simple for everyone.
    I might get some time later to try that.
    Thanked by:
  23. #23  

    Default

    Hi all, first post here and very new to android in general.
    I don't actually have an asound.conf in system/etc so I figured I would attempt to copy the downmixed and boosted file over to the directory. I tried to use ES file manager with superuser permissions, but kept getting denied. I don't have adb installed and am kind of reluctant to mess around with the android sdk at the moment.

    I am wondering if there is a way to copy those files there using gscript from the sd card? Or if there is some other simple way to get the 2 files from the SD card to the correct folder on the nook?

    Thanks
  24. #24  
    mute's Avatar

    Posts
    3 Posts

    Default Re: [HOW-TO] Downmix stereo to mono and boost volume for the inte

    The nook speaker already does l/r mixing to the mono speaker through hardware. All you really need to do is boost the output.... and that can be done with any decent free EQ app. I use this one:

    https://market.android.com/details?i...=search_result

    Just raise all the bands to +10db or whatever you want. 10db will clip the speaker when you have the volume rocker all the way up, but its there for when you need it on quieter videos/mp3s/etc.
  25. #25  

    Default Re: [HOW-TO] Downmix stereo to mono and boost volume for the inte

    Quote Originally Posted by mute View Post
    The nook speaker already does l/r mixing to the mono speaker through hardware.
    Everything I've read and my own testing (playing with L&R output on Mobo Player) tells me that this is incorrect. I wish it were correct, but it doesn't seem to be the case.
Page 1 of 2 12 LastLast

Posting Permissions