Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Drivers
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Buschel - 2009-03-31
Last edited by Buschel - 2010-01-23

FS#10082 - Full range volume control for WM8758 (iPod 5G)

This patch enables volume control for headphones from -90..+6 dB when using a WM8758 Wolfson Codec (e.g. iPod 5G). The advantage is that users may lower the volume even below svn’s -57dB limitation – at least I find it helpful as I mostly listen to music via my iPod at night.
The full range control is achieved through separating volume control into two 4 steps:
1) all max (>=+6 dB)
2) amplifier output is controlled, DAC output is max (for better snr) (-57..+6 dB)
3) amplifier output is min but not muted, DAC output is controlled (-89..-58 dB)
4) all muted (⇐-90 dB)
When lowering the volume below -57dB the lineout is also affected.

Closed by  Buschel
2010-01-23 19:35
Reason for closing:  Accepted
Additional comments about closing:  

Commited with r24318

MikeS commented on 2009-03-31 22:17

The WM8978 code (Gigabeat S) did exactly this at first but had to resort to strangeness to get full volume range with uniform spacing throughout on the analog inputs as well for both recording and playback of FM Radio and PCM.

In fact I have kind of stolen the idea from the WM8978. First I did only change volume via DAC, but of course this lead to baaad noise floor :-) I did not have a look into analog input or recording yet (as I do and did not use it).

I normally use an inline volume control between the device and my headphones. It broke on Monday, and I got to see how bad the present volume control is with efficient low impedance headphones which seal against the ear canal. Based on that experience, this patch is definitely necessary. The math seems correct, the volume control seems reasonably linear, and it’s still totally usable for adjusting volume at higher levels. I don’t like how line out isn’t fixed at low volumes, but that’s far better than inability to lower headphone volume sufficiently.

I do not see any reasonable way to keep the lineout stable below -57 dB. For the playback usecase: The DAC output is the only input for the mixer. The mixer settings do only allow to set gains for mixing the input signal to the output signal. The single output of the mixer is then handed over to OUT1 and OUT2. The only way to compensate for the DAC output reduction is to lower the output volume of OUT2 (lineout) by -32 dB as default. When the DAC is reduced in 1dB-steps the OUT2 volume is raised in 1dB-steps. This will keep the volume stabe, but we will loose 32 dB SNR on the lineouts. This is not reasonable in my opinion.

Edit1: Added some more thoughts.
Edit2: Corrected numbers…

Patch works very nicely on my 80GB 5.5G ipod video. Finally I can use my ipod video at a comfortable volume in a quiet environment instead of having to swap over to one of my other rockboxed players.

Michael, I tried to get into the WM8978-code. Lots of weird calculations, but logical after a while. If I see it correctly from your code and the WM8758 spec, your code could be easily adapted to the WM8758 – same mixers are used and the signal flow matches the volume control logic of your code. Some things I am concerned of:
1. Does changing both DAC and OUTVOL at the same time lead to fuzzy output volume? (e.g. lowering DAC by 3dB and raising OUTVOL by 2dB at the same time)
2. From the signal flow diagrams of the WM8758 I see that the ADCBOOST is done before ADC conversion. Isn’t the rec volume affected by this?
3. For the iPod 5.5G the lineout also has to be taken care of. As described above I see no way of keeping it stable over the full volume range.

MikeS commented on 2009-04-10 03:51

Andree,
1. Volume control is quite smooth actually. These adjustment happen quickly enough that there isn’t time to hear anything and the adjustments are not large which helps to mask it.
2. Gigabeat S needs to use the +20dB gain for the FM and so things have to be routed there. It’s using the MIC inputs as single ended and so the PGA control there doesn’t really work properly (otherwise it could have alot of signal boost but I could only manage +8dB by keeping PGA constant using other gain stages).
3. True, Line Out will need handling to compensate the strange DAC adjustments. DAC volume will affect Line Out and I see no way around that.

I worked it out for Gigabeat S in a particular way but other schemes could possibly be done. Gigabeat S needs alot of attenuation because it’s so loud.

hi, how do you use this patch? do it make it so you can use the new ipod headphones with the remote and mic for the ipod 5G?

I’m using this patch since ever and I never got any problems.
I think it can be committed in trunk.

Commited with r24318

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing