Subject: Multiple AC'97 codecs
To: None <>
From: Jared D. McNeill <>
List: tech-kern
Date: 04/08/2005 12:33:38
Currently our AC'97 code assumes that we're only talking to the first 
codec. The spec allows for multiple codecs, and they don't have to be in 
any particular order. So far we've been safe with assuming that audio 
codecs are the first, but I don't want to build the assumption into the 
low-level hardware drivers that modem codecs are always the second.

What I'm proposing is adding the ability to pass a hint to ac97_attach, 
AC97_CODEC_AUDIO or AC97_CODEC_MODEM, that on attach will search for a 
codec of a specific type to use. We can speed up the search for 
known-codecs by marking them as AC97_CODEC_TYPE_AUDIO or 
AC97_CODEC_TYPE_MODEM in struct ac97_codecid. For unknown codecs, there 
are other ways to determine whether a codec is a modem or audio codec 
(looking at ext_id and ext_mid for 2.x codecs; if we determine that we're 
not dealing with a 2.x codec we can look at the AC97_CAPS_MODEMLINECODEC 
bit in AC97_REG_RESET).

Any comments or objections?