Kernel Bug Tracker – Bug 46451
[patch] sound: EMU8000 DRAM sized 512 KiB too small (most of the time)
Last modified: 2012-10-23 18:30:17 UTC
Created attachment 78501 [details]
patch emu8000.c to fix size_dram
In emu8000.c, size_dram determines the amount of memory on the sound card by doing write/readback tests starting at 0 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.
Patch to correct all cases is attached and tested with AWE64 Gold. Before:
EMU8000 [0x620]: 3584 Kb on-board memory detected
asfxload 4GMGSMT.SF2 (4174814 B) fails.
EMU8000 [0x620]: 4096 Kb on-board memory detected
asfxload 4GMGSMT.SF2 succeeds.
Please see SubmittingPatches in the kernel documentation. Patches need a Signed-off-by: line and should really go via email to the list as well.
Created attachment 78611 [details]
[PATCHv2] sound: fix emu8000 DRAM sized 512 KiB too small
v2: Fixed result still wrong in the case of 512 KiB DRAM. Oops.
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
Could you give the fixed patch in the proper style described in SubmittingPatches?
As Alan pointed, your sign-off is inevitably necessary for upstreaming.
He did .....
From: David Flater <firstname.lastname@example.org>
To: Alsa Devel <email@example.com>, Linux Kernel <firstname.lastname@example.org>
Subject: [PATCHv2] sound: fix emu8000 DRAM sized 512 KiB too small
Ah, OK, so he submitted to ML. I'll check that. Thanks.
A patch referencing this bug report has been merged in Linux v3.7-rc1:
Author: David Flater <email@example.com>
Date: Mon Aug 27 22:25:21 2012 -0400
ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small