aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/azt3328.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/azt3328.c')
-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 bb84bb68a776..5715c4d05573 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -1317,31 +1317,25 @@ snd_azf3328_codec_setfmt(struct snd_azf3328_codec_data *codec,
1317 1317
1318 snd_azf3328_dbgcallenter(); 1318 snd_azf3328_dbgcallenter();
1319 switch (bitrate) { 1319 switch (bitrate) {
1320#define AZF_FMT_XLATE(in_freq, out_bits) \ 1320 case AZF_FREQ_4000: freq = SOUNDFORMAT_FREQ_SUSPECTED_4000; break;
1321 do { \ 1321 case AZF_FREQ_4800: freq = SOUNDFORMAT_FREQ_SUSPECTED_4800; break;
1322 case AZF_FREQ_ ## in_freq: \ 1322 case AZF_FREQ_5512:
1323 freq = SOUNDFORMAT_FREQ_ ## out_bits; \ 1323 /* the AZF3328 names it "5510" for some strange reason */
1324 break; \ 1324 freq = SOUNDFORMAT_FREQ_5510; break;
1325 } while (0); 1325 case AZF_FREQ_6620: freq = SOUNDFORMAT_FREQ_6620; break;
1326 AZF_FMT_XLATE(4000, SUSPECTED_4000) 1326 case AZF_FREQ_8000: freq = SOUNDFORMAT_FREQ_8000; break;
1327 AZF_FMT_XLATE(4800, SUSPECTED_4800) 1327 case AZF_FREQ_9600: freq = SOUNDFORMAT_FREQ_9600; break;
1328 /* the AZF3328 names it "5510" for some strange reason: */ 1328 case AZF_FREQ_11025: freq = SOUNDFORMAT_FREQ_11025; break;
1329 AZF_FMT_XLATE(5512, 5510) 1329 case AZF_FREQ_13240: freq = SOUNDFORMAT_FREQ_SUSPECTED_13240; break;
1330 AZF_FMT_XLATE(6620, 6620) 1330 case AZF_FREQ_16000: freq = SOUNDFORMAT_FREQ_16000; break;
1331 AZF_FMT_XLATE(8000, 8000) 1331 case AZF_FREQ_22050: freq = SOUNDFORMAT_FREQ_22050; break;
1332 AZF_FMT_XLATE(9600, 9600) 1332 case AZF_FREQ_32000: freq = SOUNDFORMAT_FREQ_32000; break;
1333 AZF_FMT_XLATE(11025, 11025)
1334 AZF_FMT_XLATE(13240, SUSPECTED_13240)
1335 AZF_FMT_XLATE(16000, 16000)
1336 AZF_FMT_XLATE(22050, 22050)
1337 AZF_FMT_XLATE(32000, 32000)
1338 default: 1333 default:
1339 snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate); 1334 snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate);
1340 /* fall-through */ 1335 /* fall-through */
1341 AZF_FMT_XLATE(44100, 44100) 1336 case AZF_FREQ_44100: freq = SOUNDFORMAT_FREQ_44100; break;
1342 AZF_FMT_XLATE(48000, 48000) 1337 case AZF_FREQ_48000: freq = SOUNDFORMAT_FREQ_48000; break;
1343 AZF_FMT_XLATE(66200, SUSPECTED_66200) 1338 case AZF_FREQ_66200: freq = SOUNDFORMAT_FREQ_SUSPECTED_66200; break;
1344#undef AZF_FMT_XLATE
1345 } 1339 }
1346 /* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */ 1340 /* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */
1347 /* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */ 1341 /* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */