At Thu, 10 Mar 2005 12:43:46 +0100, I wrote: > > At Fri, 25 Feb 2005 14:23:17 +0000, > Liam Girdwood wrote: > > > > [1 ] > > This patch is against ac97_codec.c and includes parts of Takashi's AC97 > > low power codec patch posted to lkml on Jan 4th 2005. It also includes > > better enumerated mixer type support. > > > > Apologies for the size of this patch. This was the minimum changes > > required to get audio in/out of the codec. > > > > Changes:- > > > > o Added WM9713/WM9714 to codec ID table > > o Removed snd_ac97_[info|get|put]_mux(). > > o Added snd_ac97_[info|get|put]_enum_single() for single channel enums > > o Added snd_ac97_[info|get|put]_enum_double() for double channel enums > > o Moved AC97_ENUM_DOUBLE macro to ac97_local.h > > o Moved AC97_DOUBLE macro to ac97_local.h > > How about to create unified enum callbacks for both single and double > channels? For example, in get/put callback, if shift_l == shift_r, > it's handled as a single control, otherwise double. The attached is the changed patch: - only snd_ac97_*_enum_double(), no single callbacks - change the definition of AC97_* macro: AC97_ENUM_DOUBLE() and AC97_ENUM_SINGLE() defines the enum struct for double and single channels. AC97_ENUM() defines the control struct. (IMO, this is more straightforward.) - WM-specific flags are set in the patch. Only AC97_DEFAULT_POWER_OFF is set in ac97_codec.c, which has to be known before the patch. - fix compilation warnings. Liam, could you check whether it's OK? Takashi