From: Takashi Iwai Subject: Re: [PATCH] Show processing coefficients in codec proc file Date: Thu, 19 Aug 2010 20:28:16 +0200 Message-ID: References: <4C6D7546.4000506@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id E980A24530 for ; Thu, 19 Aug 2010 20:28:16 +0200 (CEST) In-Reply-To: <4C6D7546.4000506@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org At Thu, 19 Aug 2010 20:17:42 +0200, David Henningsson wrote: > > This patch is helpful for tracking down bugs without having all > information about the chip. I don't want to change coef index in reading a proc file in general. If any, you should implement a codec-specific hook. thanks, Takashi > > -- > David Henningsson, Canonical Ltd. > http://launchpad.net/~diwic > [2 0001-Show-processing-coefficients-in-codec-proc-file.patch ] > >From 568a3c0e45396cf6cfd8e8dac13f76f756c7e3f3 Mon Sep 17 00:00:00 2001 > From: David Henningsson > Date: Thu, 19 Aug 2010 18:40:44 +0200 > Subject: [PATCH 1/2] Show processing coefficients in codec proc file > > Signed-off-by: David Henningsson > --- > sound/pci/hda/hda_proc.c | 16 ++++++++++++++-- > 1 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c > index f025200..88e40f0 100644 > --- a/sound/pci/hda/hda_proc.c > +++ b/sound/pci/hda/hda_proc.c > @@ -467,11 +467,23 @@ static void print_unsol_cap(struct snd_info_buffer *buffer, > static void print_proc_caps(struct snd_info_buffer *buffer, > struct hda_codec *codec, hda_nid_t nid) > { > + int i, val; > unsigned int proc_caps = snd_hda_param_read(codec, nid, > AC_PAR_PROC_CAP); > + unsigned int ncoeff = (proc_caps & AC_PCAP_NUM_COEF) >> > + AC_PCAP_NUM_COEF_SHIFT; > + > snd_iprintf(buffer, " Processing caps: benign=%d, ncoeff=%d\n", > - proc_caps & AC_PCAP_BENIGN, > - (proc_caps & AC_PCAP_NUM_COEF) >> AC_PCAP_NUM_COEF_SHIFT); > + proc_caps & AC_PCAP_BENIGN, ncoeff); > + for (i = 0; i < ncoeff; i++) { > + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, > + i); > + val = snd_hda_codec_read(codec, nid, 0, > + AC_VERB_GET_PROC_COEF, 0); > + snd_iprintf(buffer, " Processing coef %d: 0x%x\n", i, > + val); > + } > + > } > > static void print_conn_list(struct snd_info_buffer *buffer, > -- > 1.7.0.4 >