Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: lifeless on November 21, 2008, 08:37:24 PM

Title: WM8731L codec, low volume and sound distortions
Post by: lifeless on November 21, 2008, 08:37:24 PM
Hello guys.

I'm working on port for my GoGear HDD1620 player.
Sound is working now, but with 0db volume sound have much distortions (with eq disabled).
Sound is ok on -6db.

I have checked OF and it can sound much louder without any distortions (eq disabled too).

Does anyone familiar with this issue? Rockbox works great for ui etc, but I have just disappointed with it's sound.

p.s. I have tested mp3 in RB and OF and Flac in RB
Title: Re: WM8731L codec, low volume and sound distortions
Post by: LambdaCalculus on November 21, 2008, 08:48:07 PM
We'd be happy to see any code you wrote to get sound on the GoGear HDD1620. Can you post a patch in the tracker?
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on November 22, 2008, 07:37:46 AM
Yes sure, I'll post patches regarding this player.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on November 29, 2008, 07:32:34 PM
Sorry for delay, I have posted patches.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lowlight on November 29, 2008, 08:53:00 PM
Thanks for your patches. I'll have a look this week (I did the initial hdd1630 commit).
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lowlight on December 01, 2008, 05:10:41 PM
Everything looks good with a few minor corrections. Good to hear sound!

I believe we are missing a gpio pin for proper sound output (headphone amp, maybe). There was a similar issue when porting rockbox to the m:robe 100. I see the H10 (which also uses the WM8731) does his in audiohw_postinit(), but unfortunately the same gpio bit doen't work here.

What's the difference between the HDD1620 and HDD1630?

Has this been tested on a HDD6330? (since you changed the model name in the config file.)

Also, you should send a "Ladies and Gentlemen..." email to the mailing lists (see, http://www.rockbox.org/twiki/bin/view/Main/GentlemenMails)

I'll try to commit it all this week.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on December 01, 2008, 06:25:08 PM
Great, thanks for the info about preamp, I just did not thought about it.

Service manual is the same for models HDD1420/00 HDD1620/00/05 HDD1630 HDD1635/17
14xx is 4Gb models, 16xx is 6Gb models, "xx" digits and digits after slash is for different regions I guess.
And 63xx have the same hardware except touchpad, different PCB and HDD (30Gb) bigger form-factor and capacity.

I have not tested it on 6330, because I have not this model, but as hardware is the same, it should work.
Yea touchpad is different, I don't know is it worth to add new model because of touchpad or not.
We can just add another keymap in the future?
Wiki say that 6330 have RTC.
http://www.rockbox.org/twiki/bin/view/Main/GoGearHDD6330

I will continue reversing OF for preamp and touchpad.

PS going to subscribe for rockbox-dev
Title: Re: WM8731L codec, low volume and sound distortions
Post by: JdGordon on December 01, 2008, 10:51:56 PM
if its different hardware you probably do want to create a new target
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on December 01, 2008, 11:28:43 PM
Sure guys, you know what is better =)

I missed that there should be different gpios too.
Touchpad hardware is the same, but there is more tp buttons.
CPU and sound chip the same and there is RTC, what it's for?

I'll try to get service manual for 6330 and check better.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: JdGordon on December 01, 2008, 11:35:20 PM
RTC is real time clock (i.e it can tell the time...), and if there are more buttons its very likely that the keymaps will be slightly different, so yeah a separate target is definitely needed.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lowlight on December 03, 2008, 05:45:11 PM
Update: while I haven't found the missing gpio bit for the sound, I think I understand how to operate the touchpad.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on December 03, 2008, 05:55:49 PM
Wow, and how?
I know there is something like serial interface, but on gpios. And have not found the right way.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lowlight on December 09, 2008, 05:42:36 PM
It appears the missing bits are:
GPO32_ENABLE |= 0x2;
GPO32_VAL &= ~0x2;

Try adding that to WM8731.c in audiohw_postinit().

I haven't done the commit yet because my dev maching at home is down.
Title: Re: WM8731L codec, low volume and sound distortions
Post by: lifeless on December 10, 2008, 05:41:15 AM
That works great!

Does it turn on preamp in wm8731 or another one? And how did you found this bit? I have searched in OF disassembly now and have not found any mention about bit 2 for GPO32.

UPD: I have posted a patch for lcd contrast/brightness changing in the same patch FS#9591.