26 Nov
2010
26 Nov
'10
11:52 a.m.
On Fri, Nov 26, 2010 at 03:48:49PM +0530, Koul, Vinod wrote:
static const struct snd_kcontrol_new intel_msic_snd_controls[] = { SOC_ENUM_SINGLE(OUTEN, 0x43, 0x40, headset_switch_text), };
Would this be the right thing, I am interpreting that 0x40 will be written for earpiece in above and 0x3 for headset
No, that will cause you to have an enumeration with 0x40 elements starting at bit 0x43 in the register. You're looking for a SOC_VALUE_ENUM, not a SOC_ENUM - SOC_ENUM covers contiguous ranges of values in the enumeration.
Note also that you should namespace the #defines for your register names.