Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757257AbYFLRxx (ORCPT ); Thu, 12 Jun 2008 13:53:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751839AbYFLRxq (ORCPT ); Thu, 12 Jun 2008 13:53:46 -0400 Received: from ns1.suse.de ([195.135.220.2]:43480 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750700AbYFLRxp (ORCPT ); Thu, 12 Jun 2008 13:53:45 -0400 Date: Thu, 12 Jun 2008 19:53:43 +0200 Message-ID: From: Takashi Iwai To: "Vegard Nossum" Cc: "Daniel J Blueman" , "Linux Kernel" Subject: Re: ALC883 recording troubles... In-Reply-To: <19f34abd0806121029j1f9cabf0nc852c6e1a0a98d4f@mail.gmail.com> References: <6278d2220806091259t47c9b070v269da0f5855ef014@mail.gmail.com> <19f34abd0806120603q2ddc6654r9562dfea556c2791@mail.gmail.com> <19f34abd0806120648j4f15b762r8e72c348c14b946f@mail.gmail.com> <19f34abd0806120655u75df09bfuaf33f1d54128b0b7@mail.gmail.com> <19f34abd0806120718g21ddfa3bjbf6f194aa1d3d37d@mail.gmail.com> <19f34abd0806120955r4734bca8h44774bacc65aca37@mail.gmail.com> <19f34abd0806121029j1f9cabf0nc852c6e1a0a98d4f@mail.gmail.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (x86_64-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2543 Lines: 68 At Thu, 12 Jun 2008 19:29:57 +0200, Vegard Nossum wrote: > > On Thu, Jun 12, 2008 at 6:55 PM, Vegard Nossum wrote: > > Now I consulted the HDA specification, and I find this surprising: > > > > Verb 3h (set Amplifier Gain/Mute) has the following payload bits: > > > > 15 Set Output Amp > > 14 Set Input Amp > > > > ...but the payloads that I logged (a01a and 901a) would correspond to > > bit 15 being set, which is the Output Amp! > > I applied this as well, just to make sure, and I tested again: > > @@ -906,6 +908,9 @@ int snd_hda_codec_amp_update(struct hda_codec > *codec, hda_nid_t nid, int ch, > { > struct hda_amp_info *info; > > + printk(KERN_ERR "snd_hda_codec_amp_update(): direction = %s\n", > + direction == HDA_OUTPUT ? "output" : "input"); > + > info = get_alloc_amp_hash(codec, HDA_HASH_KEY(nid, direction, idx)); > if (!info) > return 0; > > ..and yes, changing the "Capture" level does indeed set the Output bit > when modifying this control. Maybe there's something wrong with the > set-up of mixer or pin controls that makes ALSA think this is an > output stream? > > Is there something strange here: > > Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out > Pin Default 0x02a19840: [Jack] Mic at Ext Front > > Node 0x19 [Pin Complex] wcaps 0x40008b: Stereo Amp-In > Pin Default 0x99a30941: [Fixed] Mic at Int ATAPI > > Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out > Pin Default 0x0281304e: [Jack] Line In at Ext Front > > ..or it certainly seems that all the inputs claim to have output > capability too. Maybe this is what is confusing ALSA? No. Basically, the input/output amps mean the amp input to the widget and the amp output from the widget, respectively. They don't mean that the playback or capture stream direction. So, it's perfectly OK if the amp is output for a capture stream. One exception is the pin widget. In this case, the input amp means the amp applied for the input signal from this pin, and the output amp means the amp applied before sending to this pin. So, the input/output actually corresponds to the stream direction. But, for other widgets, the amp I/O is just a difference between before or after. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/