From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 09 Aug 2012 08:00:01 +0200 (CEST) Received: from cantor2.suse.de ([195.135.220.15]:36546 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1903439Ab2HIF7M (ORCPT ); Thu, 9 Aug 2012 07:59:12 +0200 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 790F4A2FB8; Thu, 9 Aug 2012 07:59:05 +0200 (CEST) Date: Thu, 09 Aug 2012 07:59:04 +0200 Message-ID: From: Takashi Iwai To: Chen Jie Cc: Huacai Chen , linux-mips@linux-mips.org, alsa-devel@alsa-project.org, Zhangjin Wu , Hua Yan , Ralf Baechle , Hongliang Tao , Fuxin Zhang , Huacai Chen Subject: Re: [alsa-devel] [PATCH V4 12/16] ALSA: HDA: Make hda sound card usable for Loongson. In-Reply-To: References: <1343977571-2292-1-git-send-email-chenhc@lemote.com> <1343977571-2292-13-git-send-email-chenhc@lemote.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-archive-position: 34072 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: tiwai@suse.de Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: At Thu, 9 Aug 2012 11:35:15 +0800, Chen Jie wrote: > > Hi, > > 2012/8/3 Takashi Iwai : > > At Fri, 3 Aug 2012 18:36:40 +0800, > > Huacai Chen wrote: > >> > >> We write these quirks on 2.6.36 some time ago, and then we port them > >> to 3.x (3.2, 3.3, 3.4 and 3.5). As you say, PMON (BIOS for Loongson) > >> doesn't set the pins correctly. Anyway, I'll try your suggestions. > > > > Thanks. I guess it should work by just adding a new entry for your > > device in cxt_fixups[] containing the right default pin-configuration > > table, then point it in cxt5066_fixups[] with the corresponding PCI > > (or codec) SSID. > > > > > > Takashi > > I've found it is a little difficult to get proper pincfg values. The > original patch builds 'input/output path' manually, the new way does > it automatically as long as providing proper pincfgs for 'end points'. > > I tried to copy related pincfgs from a workable lemote a1004 > laptop(kernel with the original patch, read from > /proc/asound/card0/codec#0), didn't help much. It doesn't help because your old patch doesn't change the default pin-configuration values. It changes the pin-control values or amp values, but not the former one. > I guess the pincfgs are not correct, and on the platform, the pincfgs > are not touched by BIOS, so I have to calculate proper pincfgs, how? Just follow the HD-audio specification :) > HDA spec explains a pincfg as four bytes. For each byte, it has bits > indicate amp/in/out/vref/ept. No, you are referring to pin control bits. This has nothing to do with the pin default configuration. You must misunderstand the spec completely. Read section 7.3.3.31 (page 179) for details. Takashi > In the kernel side, it reads a pincfg and explains it as a 32bits > flag, indicating > connect/location/device/jack_connect_type/jack_color/misc/association/sequence. > > Why they differ? How to get proper pincfg values? > > > > Regards, > -- Chen Jie >