aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAndreas Mohr <andi@lisas.de>2011-01-25 00:46:31 -0500
committerTakashi Iwai <tiwai@suse.de>2011-01-25 02:10:56 -0500
commitc9ba374d24882c04e7cc000d8cf3b0fe56511b84 (patch)
tree6e6bc9fec3a169e42d50e97f5cf72d3da51bbbc1 /sound
parent233d84c46c2253d13e10b42d88c14748fbb67a98 (diff)
ALSA: azt3328 - fix broken AZF_FMT_XLATE macro
Cleanly revert to non-macro implementation of snd_azf3328_codec_setfmt(), to fix last-minute functionality breakage induced by following checkpatch.pl recommendations without giving them their due full share of thought ("revolting computer, ensuing PEBKAC"). I would like to thank Jiri Slaby for his very timely (in -rc1 even) and unexpected (uncommon hardware) "recognition of the dangerous situation" due to his very commendable static parser use. :) Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/azt3328.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 6117595fc075..573594bf3225 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -979,31 +979,25 @@ snd_azf3328_codec_setfmt(struct snd_azf3328_codec_data *codec,
979 979
980 snd_azf3328_dbgcallenter(); 980 snd_azf3328_dbgcallenter();
981 switch (bitrate) { 981 switch (bitrate) {
982#define AZF_FMT_XLATE(in_freq, out_bits) \ 982 case AZF_FREQ_4000: freq = SOUNDFORMAT_FREQ_SUSPECTED_4000; break;
983 do { \ 983 case AZF_FREQ_4800: freq = SOUNDFORMAT_FREQ_SUSPECTED_4800; break;
984 case AZF_FREQ_ ## in_freq: \ 984 case AZF_FREQ_5512:
985 freq = SOUNDFORMAT_FREQ_ ## out_bits; \ 985 /* the AZF3328 names it "5510" for some strange reason */
986 break; \ 986 freq = SOUNDFORMAT_FREQ_5510; break;
987 } while (0); 987 case AZF_FREQ_6620: freq = SOUNDFORMAT_FREQ_6620; break;
988 AZF_FMT_XLATE(4000, SUSPECTED_4000) 988 case AZF_FREQ_8000: freq = SOUNDFORMAT_FREQ_8000; break;
989 AZF_FMT_XLATE(4800, SUSPECTED_4800) 989 case AZF_FREQ_9600: freq = SOUNDFORMAT_FREQ_9600; break;
990 /* the AZF3328 names it "5510" for some strange reason: */ 990 case AZF_FREQ_11025: freq = SOUNDFORMAT_FREQ_11025; break;
991 AZF_FMT_XLATE(5512, 5510) 991 case AZF_FREQ_13240: freq = SOUNDFORMAT_FREQ_SUSPECTED_13240; break;
992 AZF_FMT_XLATE(6620, 6620) 992 case AZF_FREQ_16000: freq = SOUNDFORMAT_FREQ_16000; break;
993 AZF_FMT_XLATE(8000, 8000) 993 case AZF_FREQ_22050: freq = SOUNDFORMAT_FREQ_22050; break;
994 AZF_FMT_XLATE(9600, 9600) 994 case AZF_FREQ_32000: freq = SOUNDFORMAT_FREQ_32000; break;
995 AZF_FMT_XLATE(11025, 11025)
996 AZF_FMT_XLATE(13240, SUSPECTED_13240)
997 AZF_FMT_XLATE(16000, 16000)
998 AZF_FMT_XLATE(22050, 22050)
999 AZF_FMT_XLATE(32000, 32000)
1000 default: 995 default:
1001 snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate); 996 snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate);
1002 /* fall-through */ 997 /* fall-through */
1003 AZF_FMT_XLATE(44100, 44100) 998 case AZF_FREQ_44100: freq = SOUNDFORMAT_FREQ_44100; break;
1004 AZF_FMT_XLATE(48000, 48000) 999 case AZF_FREQ_48000: freq = SOUNDFORMAT_FREQ_48000; break;
1005 AZF_FMT_XLATE(66200, SUSPECTED_66200) 1000 case AZF_FREQ_66200: freq = SOUNDFORMAT_FREQ_SUSPECTED_66200; break;
1006#undef AZF_FMT_XLATE
1007 } 1001 }
1008 /* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */ 1002 /* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */
1009 /* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */ 1003 /* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */