Hi Maxime,

On Tue, 8 Dec 2015 10:09:50 +0100
Maxime Ripard <[email protected]> wrote:

> > Now I added an ugly hack to make Mic Gain work on A10 as well - but I don't 
> > have 
> > A10 hardware. Let's see what they say.
> 
> That I really prefer having nothing over an "ugly hack" :)

I figured you'd say that :)

But for these kind of architectural decisions should I send the question to all 
the people get_maintainers tells me in advance? Or pick one?
Or should I include it in the patch E-Mail above the "---"?

Like this:

PREG1 is the Mic1-In Pre-Amplifier gain control.
PREG2 is the Mic2-In Pre-Amplifier gain control.

The A10 has PREG1 and PREG2 in the ADC control register.
The A20 has PREG1 and PREG2 in the (new) PHONE_CAL control register.

Right now my (v5) probe function modifies the global variable 
"sun4i_codec_widgets" depending on the compatible string.
I think it's safe for the time being since the codec is on-die and it's not 
possible to suddenly need both sun4i widgets and sun7i widgets in the same 
kernel at the same time.
(I don't have A10 hardware. So I wrote it in a way that in the A10 case 
it doesn't have to do anything and in the A20 case it does the modifications.
That way, I could test the modifications (I do have A20 hardware))

The alternatives would be to either
1) split the driver up into kernel modules "sun4i-codec" and "sun7i-codec". 
   Maybe add a common object file to reduce duplicate work.
   This would be an user-visible change. Is that even allowed?
2) make the "sun4i-codec" kernel module register two different codecs 
   with two different compatibles and two different "sun4i"_codec_widget 
   variables. Is that even possible?
3) make ALSA dynamically add two different widgets at run time depending on 
   the compatible (not added to the "sun4i_codec_widget" array). 
   Is that even possible?

Which do we prefer?

(All that because someone just had to move those bits. Sigh.
The space where they were in A10 is empty in A20, so it's not like they 
needed the space or anything)

Regards,
   Danny

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to