Bug 5568

Summary: opl3sa driver broken in 2.6.14
Product: Drivers Reporter: Nick Battle (nick.battle)
Component: PNPAssignee: Zwane Mwaikambo (zwane)
Status: CLOSED CODE_FIX    
Severity: normal CC: akpm, ponga, tiwai, zwane
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.14 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Patch to fix opl3sa2 detection
opl3sa2-card-probe-hack
disable PnP but only use ISA PnP

Description Nick Battle 2005-11-08 01:12:19 UTC
Most recent kernel where this bug did not occur: 2.6.13
Distribution: SuSE 9.2, though with a standard kernel and custom build
Hardware Environment: Intel AL440LX with onboard OPL3SA sound
Software Environment: 2.6.14, ALSA 1.0.10rc1, all drivers built-in
Problem Description:

The opl3sa device is initially recognised by ISA PNP, producing the following in
dmesg:

  isapnp: Scanning for PnP cards...
  isapnp: Card 'OPL3-SA3 Snd System'
  isapnp: 1 Plug & Play card detected total

But when ALSA comes to initialise the device, it raises an error:

  Advanced Linux Sound Architecture Driver Version 1.0.10rc1 (Mon Sep 12
08:13:09 2005 UTC).
  pnp: Device 00:01.00 activated.
  pnp: Device 00:01.00 disabled.
  opl3sa2-pnpbios: probe of 00:01.00 failed with error -2
  ALSA device list:
    No soundcards found.

Booting with a standard 2.6.13 kernel works perfectly, as:

  Advanced Linux Sound Architecture Driver Version 1.0.9b (Thu Jul 28 12:20:13
2005 UTC).
  pnp: Device 00:01.00 activated.
  ALSA device list:
    #0: Yamaha OPL3-SA23 at 0x370, irq 5, dma 0&1

At Zwane's suggestion, I tried applying the following patch, but the problem
persists:

# HG changeset patch
# User Linus Torvalds <torvalds@g5.osdl.org>
# Node ID 49cffba393b72570babb29fcc612090d76335af0
# Parent  cce48df4d10de2a2a3312abe5f6b3b3f6d2004e8
Fix PIIX4 SMB region size

Relevant looking .config settings are:

CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_GENERIC_DRIVER=y
CONFIG_SND_MPU401_UART=y
CONFIG_SND_OPL3_LIB=y
CONFIG_SND_MPU401=y
CONFIG_SND_CS4231_LIB=y
CONFIG_SND_OPL3SA2=y


Steps to reproduce:  boot OPL3SA device with 2.6.14

Zwane has full dmesg outputs for 2.6.13 and 2.6.14, together with the respective
.config files.
Comment 1 Nick Battle 2005-11-08 05:05:59 UTC
I forgot to mention that I tried it with ACPI disabled, but that didn't make any
difference.
Comment 2 Andrew Morton 2005-11-11 02:18:22 UTC
Takashi, I think you broke opl3sa
Comment 3 Takashi Iwai 2005-11-11 03:06:57 UTC
I believe it's not my change who broke :)

Could you try the attached patch?
Comment 4 Takashi Iwai 2005-11-11 03:07:35 UTC
Created attachment 6540 [details]
Patch to fix opl3sa2 detection
Comment 5 Nick Battle 2005-11-11 03:13:11 UTC
I can try the patch tonight (UK time). Thanks.
Comment 6 Adam Belay 2005-11-11 13:48:38 UTC
Created attachment 6547 [details]
opl3sa2-card-probe-hack

Does this solve your problem?

Thanks,
Adam
Comment 7 Anonymous Emailer 2005-11-12 04:41:08 UTC
Reply-To: nick.battle@freeuk.com

Adam,

Thanks for the second patch, but I'm afraid it still makes no difference
(I applied it to the original version of the file).

Is this reproducible with other OPL3SA users incidentally?

Comment 8 Nick Battle 2005-11-14 01:00:35 UTC
Created attachment 6576 [details]
disable PnP but only use ISA PnP

Patch provided by Takashi (by email), added here so we can track everything in
one place. I'll try this tonight.
Comment 9 Nick Battle 2005-11-14 12:21:44 UTC
Takashi,

Your patch from Friday has made a difference this time, but still no sound.

Firstly, the compilation produces a warning:
"sound/isa/opl3sa2.c:851: warning: `opl3sa2_pnp_driver' defined but not used"

Then booting the kernel produces *no* error messages around the ALSA
initialization, but no cards recognised either:

<6>Advanced Linux Sound Architecture Driver Version 1.0.10rc1 (Mon Sep 12
08:13:09 2005 UTC).
<6>ALSA device list:
<6>  No soundcards found.

The earlier ISA PnP section is as before:
<6>isapnp: Scanning for PnP cards...
<6>isapnp: Card 'OPL3-SA3 Snd System'
<6>isapnp: 1 Plug & Play card detected total

Note that I'm also not seeing your debug printk message. That should presumably
come out as level <7>? There are other level 7's in the boot log, so logging is
printing them, but the one you added to the patch does not appear.
Comment 10 Lee Revell 2006-01-20 18:52:43 UTC
Did you ever make any more progress on this?
Comment 11 Nick Battle 2006-08-07 04:47:59 UTC
> Did you ever make any more progress on this?

Apologies for not responding to this sooner, but shortly after my last post on
this bug my motherboard blew up (complete with bang and blue smoke etc). The
replacement has a different sound system, so I have been unable to verify
whether recent kernel changes have fixed the bug.

Just after my mobo disaster, I managed to find someone with a opl3sa card who
could reproduce the problem, and put them in touch with Zwane. I don't know
whether they've tried it since.
Comment 12 JM Maddux 2006-08-08 19:19:58 UTC
Well, I just installed the 2.6.17-8 kernel to see if my sound would work, and...
it did! No issues. 
I had problems with 2.6.14 initially, so I backed off to 2.6.8 to get sound
working (among other things) - I still had to go through some hoops, but I got
it working flawlessly.
Maybe this will be of use to someone: <http://tinyurl.com/nyf5h> (Google Groups)
Anyway, does not look like a kernel issue, at least in 2.6.17.
-Ponga
Comment 13 Nick Battle 2006-08-10 08:17:10 UTC
Closing as this now appears to be resolved in 2.6.17.