linux-mips
[Top] [All Lists]

Re: [alsa-devel] [PATCH V2 13/16] ALSA: HDA: Make hda sound card usable

To: Huacai Chen <chenhuacai@gmail.com>
Subject: Re: [alsa-devel] [PATCH V2 13/16] ALSA: HDA: Make hda sound card usable for Loongson.
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 19 Jun 2012 11:26:56 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, alsa-devel@alsa-project.org, Zhangjin Wu <wuzhangjin@gmail.com>, Hua Yan <yanh@lemote.com>, Fuxin Zhang <zhangfx@lemote.com>, Hongliang Tao <taohl@lemote.com>, Huacai Chen <chenhc@lemote.com>
In-reply-to: <1340088624-25550-14-git-send-email-chenhc@lemote.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1340088624-25550-1-git-send-email-chenhc@lemote.com> <1340088624-25550-14-git-send-email-chenhc@lemote.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO)
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@lemote.com>
> Signed-off-by: Hongliang Tao <taohl@lemote.com>
> Signed-off-by: Hua Yan <yanh@lemote.com>
> Cc: alsa-devel@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

<Prev in Thread] Current Thread [Next in Thread>