Re: Linux 2.4.21-pre4

From: Thomas Davis (tadavis@lbl.gov)
Date: Thu Jan 30 2003 - 12:53:35 EST


Alan Cox wrote:

> On Thu, 2003-01-30 at 17:26, Thomas Davis wrote:
>
> >>FM801 is still the card not the codec. Somewhere on the FM801 is a
> 48pin AC97 codec,
> >>it may even vary by card version, much like I have intel i810 audio
> with a variety
> >>of codec devices.
> >>
> >
> >Yes, I agree on that.. I'm just trying to get the name "Forte Media
> >FM801" instead of "Unknown" to show up in the ac97 list.
>
>
> Why ? How do you even know the codec is made by forte media ?
>

because the forte driver does this:

[tdavis@lanshark sound]$ grep ac97 forte.c
#include <linux/ac97_codec.h>
         spinlock_t ac97_lock;
         struct ac97_codec *ac97;
  * forte_ac97_wait:
forte_ac97_wait (struct forte_chip *chip)
  * forte_ac97_read:
forte_ac97_read (struct ac97_codec *codec, u8 reg)
         spin_lock (&chip->ac97_lock);
         if (forte_ac97_wait (chip)) {
                 printk (KERN_ERR PFX "ac97_read: Serial bus busy\n");
         if (forte_ac97_wait (chip)) {
                 printk (KERN_ERR PFX "ac97_read: Bus busy reading reg
0x%x\n",
                 printk (KERN_ERR PFX "ac97_read: Invalid data port");
         spin_unlock (&chip->ac97_lock);
  * forte_ac97_write:
forte_ac97_write (struct ac97_codec *codec, u8 reg, u16 val)
         spin_lock (&chip->ac97_lock);
         if (forte_ac97_wait (chip)) {
                 printk (KERN_ERR PFX "ac97_write: Serial bus busy\n");
         if (forte_ac97_wait (chip)) {
                 printk (KERN_ERR PFX "ac97_write: Bus busy after write\n");
         spin_unlock (&chip->ac97_lock);
         file->private_data = chip->ac97;
         struct ac97_codec *codec = (struct ac97_codec *)
file->private_data;
         if (!create_proc_read_entry("driver/forte/ac97", 0, 0,
ac97_read_proc, forte->ac97)) {
         remove_proc_entry ("driver/forte/ac97", NULL);
         struct ac97_codec *codec;
         if ((codec = kmalloc (sizeof (struct ac97_codec), GFP_KERNEL))
== NULL)
         memset (codec, 0, sizeof (struct ac97_codec));
         codec->codec_read = forte_ac97_read;
         codec->codec_write = forte_ac97_write;
         if (ac97_probe_codec (codec) == 0) {
         chip->ac97 = codec;
         spin_lock_init (&chip->ac97_lock);
         unregister_sound_mixer (chip->ac97->dev_mixer);

ie, it has a ac97 support in the driver, it calls ac97_probe_codec?

Is that enough or not?

-
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/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:24 EST