[alsa-devel] [PATCH V2 13/16] ALSA: HDA: Make hda sound card usable for Loongson.
Takashi Iwai
tiwai at suse.de
Tue Jun 19 11:26:56 CEST 2012
At Tue, 19 Jun 2012 14:50:21 +0800,
Huacai Chen wrote:
>
> Lemote A1004(Laptop) and A1205(All-In-One) use Conexant's hda codec,
> this patch make it usable:
> 1, Use 32-bit DMA as a workaround (Loongson has a hardware bug that it
> doesn't support DMA address above 4GB).
> 2, Modify patch_conexant.c to add Lemote specific code.
>
> Signed-off-by: Huacai Chen <chenhc at lemote.com>
> Signed-off-by: Hongliang Tao <taohl at lemote.com>
> Signed-off-by: Hua Yan <yanh at lemote.com>
> Cc: alsa-devel at alsa-project.org
> ---
> include/linux/pci_ids.h | 2 +
> sound/pci/hda/hda_intel.c | 5 ++++
> sound/pci/hda/patch_conexant.c | 52 ++++++++++++++++++++++++++++++++++++++-
> 3 files changed, 57 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index ab741b0..d8b0a52 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2906,3 +2906,5 @@
> #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
>
> #define PCI_VENDOR_ID_OCZ 0x1b85
> +
> +#define PCI_VENDOR_ID_LEMOTE 0x1c06
As Clemens already suggested, please split your patch. The addition
of PCI ID, addition of the workaround in HD-audio controller code, and
the modification to Conexant codec code are all different things.
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 2b6392b..2b73ed4 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -3013,6 +3013,11 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip)
> gcap &= ~ICH6_GCAP_64OK;
> }
>
> +#ifdef CONFIG_CPU_LOONGSON3
> + /* Workaround: Loongson 3 doesn't support 64-bit DMA */
> + gcap &= ~ICH6_GCAP_64OK;
> +#endif
Where is CONFIG_CPU_LOONGSON3 defined at all?
This isn't found in the upstream Linus or linux-next tree.
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index 3acb582..1c8dfb9 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -142,6 +142,7 @@ struct conexant_spec {
> unsigned int thinkpad:1;
> unsigned int hp_laptop:1;
> unsigned int asus:1;
> + unsigned int lemote:1;
In general, we don't accept such a static quirk any longer unless a
special reason is given. Doesn't the auto-parser work for you?
thanks,
Takashi
More information about the Alsa-devel
mailing list