20 Apr
2015
20 Apr
'15
11:41 p.m.
On Mon, Apr 20, 2015 at 10:37:21AM +0800, Bard Liao wrote:
--- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -198,7 +198,6 @@ static const struct reg_default rt5645_reg[] = { { 0xda, 0x0000 }, { 0xdb, 0x0003 }, { 0xdc, 0x0049 },
- { 0xdd, 0x001b }, { 0xdf, 0x0008 }, { 0xe0, 0x4000 }, { 0xe6, 0x8000 },
That's a bit weird, why is this in here?
- if (rt5645->btn_jack && rt5645->codec_type == CODEC_TYPE_RT5650) {
Can we have a switch statement for the device type so it's easier to add other devices if there's new derivatives please?
btn_type = rt5645_button_detect(rt5645->codec);
switch (btn_type) {
case 0x8000:
case 0x4000:
case 0x2000:
report |= SND_JACK_BTN_0;
break;
Why do we mash all these values together?