[OSS] Add CXT48 to modem black list in ac97
diff mbox series

Message ID E1DInEA-0006md-00@gondolin.me.apana.org.au
State New, archived
Headers show
Series
  • [OSS] Add CXT48 to modem black list in ac97
Related show

Commit Message

Herbert Xu April 5, 2005, 12:32 p.m. UTC
SuD Alex <sud@latinsud.com> wrote:
>
> Googling i found that  jgarzik already got a patch for this 
> (ac97_codec.c:158):
> +    {0x43585430, "CXT48",            &default_ops,        
> AC97_DELUDED_MODEM },

Yes, until we manage to copy what ALSA does in this case, this
is what we'll have to do.

The following patch works around the misdetection of the CXT48
codec as a modem by the OSS ac97 driver.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> 

We should fix the crash itself too.  Andrew, I'll send you some
a couple of patches on that later.

BTW Alex, if you have the time please determine whether ALSA
works properly on your machine.

Cheers,

Comments

SuD (Alex) April 13, 2005, 9:59 p.m. UTC | #1
Herbert Xu wrote:

>BTW Alex, if you have the time please determine whether ALSA
>works properly on your machine.
>  
>
Yes, alsa works, it's what i'm using now.

About how alsa detects the hardware, i have been reading some sources
and didn't get the whole point, but some facts:
- In intel8x0.c:
    In snd_intel8x0_probe() there is a call to snd_intel8x0_mixer().
    In that function it does: ac97.scaps = AC97_SCAP_SKIP_MODEM;

- In intel8x0.c:
    In snd_intel8x0m_probe() there is a call to snd_intel8x0_mixer().
    In that function it does: ac97.scaps = AC97_SCAP_SKIP_AUDIO;

- After that is done, in ac97_codec.c:
    http://lxr.linux.no/source/sound/pci/ac97/ac97_codec.c#L1921
    It checks for _SKIP_ variables and probes for soundcard (checking a 
mixer register) and modem (checking modem_id).

As a result, if i insert "snd-intel8x0" it will detect a soundcard (pci 
0:0:1f.5), but if insert instead
"snd-intel8x0M" it will detect a modem (pci 0:0:1f.6).
If a modem is detected i get errors like: "MC'97 0 converters and GPIO 
not ready (0x1)", and not sure how to test it.
If i load both modules only the first will work. The second will give an 
probe error -13 (EACCES?), because it has been marked as audio device, 
but also marked as _SKIP_AUDIO (ac97_codec.c:1862), or viceversa.

PS: And i finally subscribed to the list, thanks for your patience.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Herbert Xu April 14, 2005, 1:07 p.m. UTC | #2
On Wed, Apr 13, 2005 at 11:59:24PM +0200, SuD (Alex) wrote:
> 
> As a result, if i insert "snd-intel8x0" it will detect a soundcard (pci 
> 0:0:1f.5), but if insert instead
> "snd-intel8x0M" it will detect a modem (pci 0:0:1f.6).
> If a modem is detected i get errors like: "MC'97 0 converters and GPIO 
> not ready (0x1)", and not sure how to test it.
> If i load both modules only the first will work. The second will give an 
> probe error -13 (EACCES?), because it has been marked as audio device, 
> but also marked as _SKIP_AUDIO (ac97_codec.c:1862), or viceversa.

Thanks for testing.

It would appear then that ALSA doesn't have a magic solution :)
It'll always treat the codec as a sound card when the sound module
is loaded.

Alan, you seem to be the one who added the original code to
i810_audio to skip the modem codecs.  Does this actually
do anything for OSS? That is, are there any modem drivers out
there that will work with OSS drivers?

If not, then I'd suggest that we simply remove the modem checks
from the OSS Code.

Cheers,

Patch
diff mbox series

===== sound/oss/ac97_codec.c 1.24 vs edited =====
--- 1.24/sound/oss/ac97_codec.c	2005-03-08 15:41:36 +11:00
+++ edited/sound/oss/ac97_codec.c	2005-04-05 22:27:11 +10:00
@@ -155,6 +155,7 @@ 
 	{0x43525931, "Cirrus Logic CS4299 rev A", &crystal_digital_ops},
 	{0x43525933, "Cirrus Logic CS4299 rev C", &crystal_digital_ops},
 	{0x43525934, "Cirrus Logic CS4299 rev D", &crystal_digital_ops},
+	{0x43585430, "CXT48",			&default_ops,		AC97_DELUDED_MODEM },
 	{0x43585442, "CXT66",			&default_ops,		AC97_DELUDED_MODEM },
 	{0x44543031, "Diamond Technology DT0893", &default_ops},
 	{0x45838308, "ESS Allegro ES1988",	&null_ops},