[alsa-devel] [PATCH 0/6] hdspmixer fixes

Takashi Iwai tiwai at suse.de
Mon Feb 28 15:07:45 CET 2011


At Mon, 28 Feb 2011 15:03:45 +0100,
Adrian Knoth wrote:
> 
> On Mon, Feb 28, 2011 at 11:14:40AM +0100, Takashi Iwai wrote:
> 
> > > Also, the old code never handled three cards correctly, but that's
> > > fixed, too. (and tested against the three RME cards currently in my
> > > workstation)
> > Thanks, applied now to alsa-tools git tree.
> 
> TNX.
> 
> > Though, the static definitions in channel_mapping.h aren't ideal.
> > If these are referred from difference places, they should be external
> > and defined only once.
> 
> I'm not sure what you mean. Do you suggest to make them external inside
> hdspmixer? Like with pixmaps.h?

Yes.

The static array definitions shouldn't be included in multiple files.
Otherwise you'll have multiple instances for the very same contents.

Move all static char xxx[] definitions into some *.c file, and make
them not static but global.
Then create channelmap.h like

extern char dest_map_dd_ss[];
extern char channel_map_df_ss[];
...


Takashi


More information about the Alsa-devel mailing list