linux/sound
David Flater 1338fc97d0 ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small
v2:  Fixed result still wrong in the case of 512 KiB DRAM.  Oops.

Applicable to 3.5.3 mainline.

In emu8000.c, size_dram determines the amount of memory on the sound card by
doing write/readback tests starting at 512 KiB and incrementing by 512 KiB.
On success, detected_size is updated to the successful address and testing
continues.  On failure, the loop is immediately exited.  The resulting
detected_size is 512 KiB too small except in two special cases:

1. If there is no memory, the initial 0 value of detected_size is used, which
   is correct.
2. If the address space wraps around, detected_size is updated before the
   bailout, so the result is correct.

The patch corrects all cases and was tested with an AWE64 Gold.  Before:
  EMU8000 [0x620]: 3584 Kb on-board memory detected
  asfxload 4GMGSMT.SF2 (4174814 B) fails.
After:
  EMU8000 [0x620]: 4096 Kb on-board memory detected
  asfxload 4GMGSMT.SF2 succeeds.

I do not have a card with 512 KiB to test with, but by forcibly enabling the
added conditional I verified on the AWE64 Gold that it detects 512 KiB
(successfully reading from the first memory location) and does not hang the
card.

C.f. Bug 46451 https://bugzilla.kernel.org/show_bug.cgi?id=46451

Signed-off-by: David Flater <dave@flaterco.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-28 19:58:12 +02:00
..
aoa sound/aoa: Adapt to new i2c probing scheme 2012-07-11 18:22:48 +10:00
arm ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM 2012-08-09 15:47:15 +02:00
atmel ALSA: sound/atmel/ac97c.c: fix error return code 2012-08-20 10:56:01 +02:00
core ASoC: Additional updates for 3.6 2012-08-20 21:26:04 +02:00
drivers ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM 2012-08-09 15:47:15 +02:00
firewire IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
i2c [media] snd_tea575x: Add a cannot_mute flag 2012-07-30 17:57:01 -03:00
isa ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small 2012-08-28 19:58:12 +02:00
mips
oss ASoC: Additional updates for 3.6 2012-08-20 21:26:04 +02:00
parisc
pci Merge branch 'for-linus' into for-next 2012-08-28 09:26:59 -07:00
pcmcia ALSA: pdaudiocf: Remove superfluous pm_message_t argument from suspend 2012-07-03 08:23:08 +02:00
ppc ALSA: sound/ppc/snd_ps3.c: fix error return code 2012-08-20 11:01:14 +02:00
sh ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions 2012-07-02 17:50:05 +02:00
soc ASoC: wm9712: Fix inverted capture volume 2012-08-17 22:43:18 +01:00
sparc
spi ALSA: Convert at73c213 to module_spi_driver 2012-01-27 15:18:36 +01:00
synth
usb Merge branch 'for-linus' into for-next 2012-08-20 22:14:26 +02:00
ac97_bus.c
Kconfig
last.c ALSA: workaround: change the timing of alsa_sound_last_init() 2012-04-19 13:51:54 +02:00
Makefile
sound_core.c sound: allow the unit search until 256 in sound_core.c 2012-05-08 17:27:03 +02:00
sound_firmware.c sound_firmware: don't pass crap to filp_close() 2012-07-29 21:24:22 +04:00