From: Takashi Iwai Subject: Re: [conf patch] modem's pcm "two device" config [was: Re: Mo' better modem support] Date: Tue, 13 Sep 2005 14:43:15 +0200 Message-ID: References: <20050905232951.GG20428@sashak.softier1.local> <20050907160343.GA3375@sashak.softier1.local> <20050912002746.GA31233@tecr> <20050912221018.GA19713@tecr> <20050913143520.GA31269@sashak.softier1.local> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20050913143520.GA31269@sashak.softier1.local> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Sasha Khapyorsky Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 13 Sep 2005 17:35:21 +0300, Sasha Khapyorsky wrote: > > On 11:34 Tue 13 Sep , Takashi Iwai wrote: > > At Tue, 13 Sep 2005 01:10:18 +0300, > > Sasha Khapyorsky wrote: > > > > > > On 19:49 Mon 12 Sep , Takashi Iwai wrote: > > > > > > > > > > Applied. Thanks. > > > > > > > > Well, I found that this might not work (still not tested, though) > > > > since the controls are usually defined with index 1, as noted in my > > > > earlier post. (It's because the modem codec is in ac97.num=1) > > > > > > And card index is usually 1 as well (first card is excluded in drivers). > > > > It's irrelevant. The hook PCM opens the corresponding control > > device. The card number is obtained from snd_pcm_info_get_card(). > > i.e. it assumes that the slave PCM is a hw. > > Hmm, why does it work then (tested) in both old and new variants? Do you mean that the modem with hooks works even without your changes of ac97_* in the driver? It would be ridiculous. Possibly, the modem codec was found in ac97.num=0? What I mentioned above is that pcm hook finds the correct control handle regardless of the card index. But each control element is not. A non-zero index of each hooked control element must be defined explicitly in hook configuration. Ditto for device and subdevice. Takashi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf