moved setup of register cache past the codec reset (which changes the registers to default values)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6913 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2004-03-06 18:33:09 +00:00
parent 4c7a07c0c6
commit b1ad80c5f5

View File

@ -210,14 +210,14 @@ ac97_attach(ac97_dev **_dev, codec_reg_read reg_read, codec_reg_write reg_write,
dev->max_vsr = 0xffff;
dev->reversed_eamp_polarity = false;
/* setup register cache */
ac97_update_register_cache(dev);
/* reset the codec */
LOG(("codec reset\n"));
ac97_reg_uncached_write(dev, AC97_RESET, 0x0000);
snooze(50000); // 50 ms
/* setup register cache */
ac97_update_register_cache(dev);
dev->codec_3d_stereo_enhancement = stereo_enhancement_technique[(ac97_reg_cached_read(dev, AC97_RESET) >> 10) & 31];
dev->capabilities = 0;