All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Yang, Libin" <Libin.Yang@amd.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: HDA-Intel - Patch to support detecting HD Audio devices with PCI class code
Date: Thu, 13 Nov 2008 11:09:55 +0100	[thread overview]
Message-ID: <s5h63msq6mk.wl%tiwai@suse.de> (raw)
In-Reply-To: <6077B97E85E7374DAE87B42B5AA9979709C0C2@sshaexmb1.amd.com>

At Thu, 13 Nov 2008 18:01:00 +0800,
Yang, Libin wrote:
> 
> Hi Takashi,
> 
> The following patch is updated. Would you please review it? Thanks a
> lot.
> ------------------------------------------------------------------------
> -
> 
> The patch uses HD Audio PCI class code to detect AMD HD Audio cards.
> 
> Signed-off-by: Libin Yang <libin.yang@amd.com>

Thanks, applied now.

(BTW, your embedded patch seems broken likely by MUA.  Please fix
 the setting or use attachments if it's difficult.)


Takashi

> 
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 8f6c1df..8ca441c 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -292,6 +292,8 @@ enum {
>  /* Define VIA HD Audio Device ID*/
>  #define VIA_HDAC_DEVICE_ID		0x3288
>  
> +/* HD Audio class code */
> +#define PCI_CLASS_MULTIMEDIA_HD_AUDIO	0x0403
>  
>  /*
>   */
> @@ -415,6 +417,7 @@ enum {
>  	AZX_DRIVER_ULI,
>  	AZX_DRIVER_NVIDIA,
>  	AZX_DRIVER_TERA,
> +	AZX_DRIVER_GENERIC,
>  	AZX_NUM_DRIVERS, /* keep this as last entry */
>  };
>  
> @@ -428,6 +431,7 @@ static char *driver_short_names[] __devinitdata = {
>  	[AZX_DRIVER_ULI] = "HDA ULI M5461",
>  	[AZX_DRIVER_NVIDIA] = "HDA NVidia",
>  	[AZX_DRIVER_TERA] = "HDA Teradici", 
> +	[AZX_DRIVER_GENERIC] = "HD-Audio Generic",
>  };
>  
>  /*
> @@ -2203,6 +2207,7 @@ static int __devinit azx_create(struct snd_card
> *card, struct pci_dev *pci,
>  			chip->playback_streams = ATIHDMI_NUM_PLAYBACK;
>  			chip->capture_streams = ATIHDMI_NUM_CAPTURE;
>  			break;
> +		case AZX_DRIVER_GENERIC:
>  		default:
>  			chip->playback_streams = ICH6_NUM_PLAYBACK;
>  			chip->capture_streams = ICH6_NUM_CAPTURE;
> @@ -2427,6 +2432,11 @@ static struct pci_device_id azx_ids[] = {
>  	{ PCI_DEVICE(0x10de, 0x0bd7), .driver_data = AZX_DRIVER_NVIDIA
> },
>  	/* Teradici */
>  	{ PCI_DEVICE(0x6549, 0x1200), .driver_data = AZX_DRIVER_TERA },
> +	/* AMD Generic, PCI class code and Vendor ID for HD Audio */
> +	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_ANY_ID),
> +	  .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
> +	  .class_mask = 0xffffff,
> +	  .driver_data = AZX_DRIVER_GENERIC },
>  	{ 0, }
>  };
>  MODULE_DEVICE_TABLE(pci, azx_ids);
> 
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Tuesday, November 11, 2008 4:43 PM
> > To: Yang, Libin
> > Cc: alsa-devel@alsa-project.org
> > Subject: Re: HDA-Intel - Patch to support detecting HD Audio devices
> with
> > PCI class code
> > 
> > At Tue, 11 Nov 2008 16:39:27 +0800,
> > Yang, Libin wrote:
> > >
> > > Thanks for the comments and I will refine the patch.
> > 
> > Thanks.  One thing I forgot to mention.
> > 
> > > > >  static unsigned int azx_default_codecs[AZX_NUM_DRIVERS]
> > > __devinitdata =
> > > > > {
> > > > >  	[AZX_DRIVER_ICH] = 3,
> > > > >  	[AZX_DRIVER_ATI] = 3,
> > > > > +	[AZX_DRIVER_AMD_AUTO] = 3,
> > > >
> > > > I thought you'll have up to 4 codecs?
> > 
> > This array is completely changed in the recent code.
> > There is only one entry (TERRA) as an exception.
> > 
> > Please create a patch based on the latest sound tree,
> >     git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
> > either master branch or topic/hda branch.
> > 
> > 
> > thanks,
> > 
> > Takashi
> 
> 

  reply	other threads:[~2008-11-13 10:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  2:43 (no subject) Yang, Libin
2008-11-11  8:17 ` Takashi Iwai
2008-11-11  8:39   ` HDA-Intel - Patch to support detecting HD Audio devices with PCI class code Yang, Libin
2008-11-11  8:43     ` Takashi Iwai
2008-11-13 10:01       ` Yang, Libin
2008-11-13 10:09         ` Takashi Iwai [this message]
2008-11-17  3:44           ` Yang, Libin
2008-11-17  8:41             ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2008-11-11  3:30 Yang, Libin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h63msq6mk.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Libin.Yang@amd.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.