[alsa-devel] Different reg_default for rt5650 codec

Bard Liao bardliao at realtek.com
Thu Oct 29 12:17:26 CET 2015


Mark,

rt5645.c support both rt5645 and rt5650 codec. And the default value of
registers are not identical. So, we may need separate reg_defaults for
rt5645 and rt5650.  My idea is to assign a new reg_defaults once rt5650
is detected.
Something like
	case RT5650_DEVICE_ID:
+		rt5645->regmap-> reg_defaults = rt5650_reg;
+		rt5645->regmap-> num_reg_defaults = ARRAY_SIZE(rt5650_reg)
		rt5645->codec_type = CODEC_TYPE_RT5650;
		break;

Is that ok?

Or should I use different regmap_config? There is one question if I use
different regmap_config. We will know which codec it is by regmap_read.
So, regmap is init before we know which codec it is. Assume rt5645_regmap
is used and what should I do once rt5650 is detected?

Thanks.

Bard Liao

Computer Peripherals Business Unit
Realtek Semiconductor Corp.
886-3-578-0211 ext. 13334
bardliao at realtek.com




More information about the Alsa-devel mailing list