[alsa-devel] [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro

Takashi Iwai tiwai at suse.de
Sat Jan 22 17:26:39 CET 2011

At Sat, 22 Jan 2011 14:56:10 +0100,
Jiri Slaby wrote:
> Despite the AZF_FMT_XLATE macro looks totally weird and useless, it's
> heavily broken (apart it also broke my parser).
> The 'break' in the macro belongs to the do-while loop and not to the
> switch. So it always falls through the all cases till the end.
> Remove the do-while from the macro.
> Also people should terminate statements with semicolons. So force
> people to do so by removing the last one in the macro.
> I vote for removing that crap completely because it makes the code
> weird anyway -- you have to specify manually both of freq and bits
> which is I would expect to be avoided exactly by such a macro.

I agree.  Andreas, please either revert back to the plain code,
or use a simple look-up table if you don't want switch/case.



More information about the Alsa-devel mailing list