ALSA: emu10k1: clarify various fx8010.*_mask fields
PATCH 1/1 ALSA: emu10k1: clarify various fx8010.*_mask fields
extin_mask and extout_mask are used only by the SbLive! microcode, so they have no effect on Audigy.
Eliminate fxbus_mask entirely, as it wasn't actually used for anything.
As a drive-by, remove the pointless pad1 field from struct snd_emu10k1_fx8010 - it is not visible to user space, so it has no binary compatibility constraints.
Signed-off-by Oswald Buddenhagen <[email protected]>
--- include/sound/emu10k1.h | 6 ++---- sound/pci/emu10k1/emu10k1_main.c | 7 ++++--- sound/pci/emu10k1/emufx.c | 9 ++++----- 3 files changed, 10 insertions(+), 12 deletions(-)
include/sound/emu10k1.h +2 -4
@@ -1599,10 +1599,8 @@ struct snd_emu10k1_fx8010_pcm { };struct snd_emu10k1_fx8010 { -unsigned short fxbus_mask;/* used FX buses (bitmask) */ -unsigned short extin_mask;/* used external inputs (bitmask) */ -unsigned short extout_mask;/* used external outputs (bitmask) */ -unsigned short pad1; +unsigned short extin_mask;/* used external inputs (bitmask); not used for Audigy */ +unsigned short extout_mask;/* used external outputs (bitmask); not used for Audigy */ unsigned int itram_size;/* internal TRAM size in samples */ struct snd_dma_buffer etram_pages;/* external TRAM pages and size */ unsigned int dbg;/* FX debugger register */
sound/pci/emu10k1/emu10k1_main.c +4 -3
@@ -1901,11 +1901,12 @@ int snd_emu10k1_create(struct snd_card *card,pci_set_master (pci); - emu->fx8010.fxbus_mask =0x303f ; +// The masks are not used for Audigy. +// FIXME: these should come from the card_capabilites table. if (extin_mask ==0 ) - extin_mask =0x3fcf ; + extin_mask =0x3fcf ;// EXTIN_* if (extout_mask ==0 ) - extout_mask =0x7fff ; + extout_mask =0x7fff ;// EXTOUT_* emu->fx8010.extin_mask = extin_mask; emu->fx8010.extout_mask = extout_mask; emu->enable_ir = enable_ir;
sound/pci/emu10k1/emufx.c +4 -5
@@ -2523,19 +2523,18 @@ static void snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_info *info) {const char *const *fxbus, *const *extin, *const *extout; -unsigned short fxbus_mask, extin_mask, extout_mask; +unsigned short extin_mask, extout_mask;int res; info->internal_tram_size = emu->fx8010.itram_size; info->external_tram_size = emu->fx8010.etram_pages.bytes /2 ; fxbus = fxbuses; extin = emu->audigy ? audigy_ins : creative_ins; extout = emu->audigy ? audigy_outs : creative_outs; - fxbus_mask = emu->fx8010.fxbus_mask; - extin_mask = emu->fx8010.extin_mask; - extout_mask = emu->fx8010.extout_mask; + extin_mask = emu->audigy ? ~0 : emu->fx8010.extin_mask; + extout_mask = emu->audigy ? ~0 : emu->fx8010.extout_mask;for (res =0 ; res <16 ; res++, fxbus++, extin++, extout++) { -copy_string (info->fxbus_names[res], fxbus_mask & (1 << res) ? *fxbus :NULL ,"FXBUS" , res); +copy_string (info->fxbus_names[res], *fxbus,"FXBUS" , res);copy_string (info->extin_names[res], extin_mask & (1 << res) ? *extin :NULL ,"Unused" , res);copy_string (info->extout_names[res], extout_mask & (1 << res) ? *extout :NULL ,"Unused" , res); }
Signature · 1 line
2.40.0.152.g15d061e6df
Takashi Iwai
AppliedQuoted 11 lines · Oswald Buddenhagen
extin_maskandextout_maskare used only by the SbLive! microcode, so they have no effect on Audigy.Eliminate
fxbus_maskentirely, as it wasn't actually used for anything.As a drive-by, remove the pointless pad1 field from struct
snd_emu10k1_fx8010- it is not visible to user space, so it has no binary compatibility constraints.Signed-off-by Oswald Buddenhagen <[email protected]>
Thanks, applied now.
Takashi