26 Jan
2011
26 Jan
'11
2:35 p.m.
On Wed, Jan 26, 2011 at 01:58:15PM +0200, Jarkko Nikula wrote:
/*
* use the last codec and dapm context of it when setting up
* the common audio map
*/
codec = list_first_entry(&card->codec_dev_list,
struct snd_soc_codec, card_list);
temp = codec->name_prefix;
codec->name_prefix = NULL;
ret = snd_soc_dapm_add_routes(&codec->dapm,
card->route, card->num_routes);
Rather than faff around like this it seems we should just bite the bullet and add a DAPM context for the card.
Probably also worth doing the same thing as this for widgets - the combination of these two would eliminate almost all machine init() functions.