[alsa-devel] The users view of an audio card
I've been editing a couple of the unofficial wiki pages and a number of issues have arisen. My own system has the NVidia/Realtek motherboard chips so I may be in the dark about what is available on other chips. Some of the questions are background to ensure that what I write later in the wiki is correct. Takashi Iwai suggested I raise the issues here:
1. A large number of users seem to be reporting problems with Nvidia and Via soundcards. As far as I can tell Nvidia and Via do not produce soundcards but they do produce chipsets with southbridges which can connect to a motherboard audio chip. The when alsamixer (or Kmix) runs it reports something like: Card: NVidia CK804 Chip: Realtek AL650 rev 0 Presumably because the southbridge is the primary PCI device.
So:
1.1 Is the above always correct (so I can add it to the wiki)? 1.2 Could alsamixer etc be modified to give a more sensible answer for non-experts.
Something like: Card: Motherboard via NVidia CK804 Chip: Realtek AL650 rev 0 might work. I presume a look-up table is used to convert the PCI 2-byte integers to the above names so presumably the extra information needed could be obtained at this level.
2. On different motherboards a Realtek 650 may be connected using a NVidia CK804 with the intel8x0 alsa driver or using a VIA VT8233 with the vt82xx driver.
2.1 Given that the audio chip registers are the same in both cases why are two different drivers needed? (Are they?) 2.2 If it is something to do with the southbridges, where may the manuals that describe the differences be found? 2.3 What would happen if the motherboard manufacturers kept the same southbridges but started using an audio chip with a different set of registers? (2.2a Where can an AD'97 manual be found? - I could not find one on the intel site)
3. The Realtek 650 datasheet implies that independently of the mixing in the main input -> line-out pathway, the input to the ADC (i.e. on capture) may include more than one source (i.e. both audio and microphone). However alsamixer (and kmix) only allows me one input stream. So:
3.1 Is the manual misleading or have I misread it? 3.2 Is the manual correct but the driver is based on an earlier intel chip which did not have this facility?
Related to this the manual seems to show a number of options which I cannot identify in alsamixer. For example the manual shows two surroundsound volume stages between which there are switched links, one to and two from the main stero path. Alsamixer shows a single amplifier. It has one link 'from' the main path but I could not find a link 'to' the main path.
3.3 Is the driver assuming a old layout which fits most of the new audio chip layout but not all? (This is really a question about what sort of warnings/advice should my write up include).
3.4 At which stage does alsa relate the registers to the descriptions, aux-volume, aux-mute etc? Again does it assume a layout which fits most aspects of the chips listed?
Thats enough for the moment. I presume I could sit down for a year and read and understand the code - but in the meantime any help will be welcome.
Regards,
David Webb.
On Thu, 2007-07-19 at 18:12 +0100, David Webb wrote:
(2.2a Where can an AD'97 manual be found? - I could not find one on the intel site)
The AC'97 PRM is here: http://download.intel.com/design/chipsets/manuals/30701701.pdf The Intel HD Audio PRM is here: http://download.intel.com/design/chipsets/manuals/30234903.pdf
Both are specs for onboard codec buses. More recent chipsets utilize the HD Audio bus specification, as it gives superior output capabilities and supports more devices (like modems and other vendor defined codecs). One of the main improvements over the AC'97 spec is the uniform programming interface (which is one of the problems you seem to be running into).
Beyond that, others will need to interject more answers to your questions.
At Thu, 19 Jul 2007 18:12:54 +0100, David Webb wrote:
I've been editing a couple of the unofficial wiki pages and a number of issues have arisen. My own system has the NVidia/Realtek motherboard chips so I may be in the dark about what is available on other chips. Some of the questions are background to ensure that what I write later in the wiki is correct. Takashi Iwai suggested I raise the issues here:
- A large number of users seem to be reporting problems with Nvidia and Via
soundcards. As far as I can tell Nvidia and Via do not produce soundcards but they do produce chipsets with southbridges which can connect to a motherboard audio chip. The when alsamixer (or Kmix) runs it reports something like: Card: NVidia CK804 Chip: Realtek AL650 rev 0 Presumably because the southbridge is the primary PCI device.
So:
1.1 Is the above always correct (so I can add it to the wiki)?
I don't know of problems. Pointers?
1.2 Could alsamixer etc be modified to give a more sensible answer for non-experts.
Something like: Card: Motherboard via NVidia CK804 Chip: Realtek AL650 rev 0 might work. I presume a look-up table is used to convert the PCI 2-byte integers to the above names so presumably the extra information needed could be obtained at this level.
Why the word "Motherboard" is so important? Also, it's not too easy to know whether it's a motherboard or not. You'd need a large database listing each device on the world. The same controller chip can be used for a desktop mobo, a laptop, an ATM, or any formfactor.
- On different motherboards a Realtek 650 may be connected using a NVidia
CK804 with the intel8x0 alsa driver or using a VIA VT8233 with the vt82xx driver.
2.1 Given that the audio chip registers are the same in both cases why are two different drivers needed? (Are they?)
Remember that you have both the audio controller and the audio codec chips. Intel (and compatible) and VIA have the completely different controller design. Thus different drivers are needed.
2.2 If it is something to do with the southbridges, where may the manuals that describe the differences be found?
The manuals don't tell you the difference usually. It has no comparison with other chipset.
2.3 What would happen if the motherboard manufacturers kept the same southbridges but started using an audio chip with a different set of registers?
Then it would be a pity :)
Usually, when the incompatibility is introduced to the controller, a different PCI ID is assigned. So, such a problem shouldn't occur in practice.
(2.2a Where can an AD'97 manual be found? - I could not find one on the intel site)
You mean AC97? Look for ALSA ftp directory.
- The Realtek 650 datasheet implies that independently of the mixing in the
main input -> line-out pathway, the input to the ADC (i.e. on capture) may include more than one source (i.e. both audio and microphone). However alsamixer (and kmix) only allows me one input stream. So:
3.1 Is the manual misleading or have I misread it?
You misread. The driver gives the mixer from analog inputs to the output as loopback, such as "Mic Playback Volume" and "Line Playback Volume". The recording source is exclusive. Thus it's implemented as an enum.
3.2 Is the manual correct but the driver is based on an earlier intel chip which did not have this facility?
No.
Related to this the manual seems to show a number of options which I cannot identify in alsamixer. For example the manual shows two surroundsound volume stages between which there are switched links, one to and two from the main stero path. Alsamixer shows a single amplifier. It has one link 'from' the main path but I could not find a link 'to' the main path.
Hum? The driver gives stereo volumes.
3.3 Is the driver assuming a old layout which fits most of the new audio chip layout but not all? (This is really a question about what sort of warnings/advice should my write up include).
Be more specific. What is old and what is new? The design of AC97 is already pretty old, as its name points :)
3.4 At which stage does alsa relate the registers to the descriptions, aux-volume, aux-mute etc? Again does it assume a layout which fits most aspects of the chips listed?
I don't understand the question. The aux mixer is always given as long as the driver detects it.
HTH,
Takashi
David Webb wrote
- A large number of users seem to be reporting problems with Nvidia and Via
soundcards. As far as I can tell Nvidia and Via do not produce soundcards but they do produce chipsets with southbridges which can connect to a motherboard audio chip. The when alsamixer (or Kmix) runs it reports something like: Card: NVidia CK804 Chip: Realtek AL650 rev 0 Presumably because the southbridge is the primary PCI device.
So:
1.1 Is the above always correct (so I can add it to the wiki)?
Yes. An AC'97 or HDA system contains two parts: the controller, which reads audio data from memory over the PCI bus, and the codec, which converts the data from digital to analog and does analog mixing. The southbridges from nVidia and VIA (and others) contain such a controller.
- On different motherboards a Realtek 650 may be connected using a NVidia
CK804 with the intel8x0 alsa driver or using a VIA VT8233 with the vt82xx driver.
2.1 Given that the audio chip registers are the same in both cases why are two different drivers needed?
The driver has to interface with the controller (and with the codec through the controller).
The code to handle various codecs is not part of the controller driver but is contained in a separate module (snd-ac97-codec) that gets loaded automatically.
- The Realtek 650 datasheet implies that independently of the mixing in the
main input -> line-out pathway, the input to the ADC (i.e. on capture) may include more than one source (i.e. both audio and microphone). However alsamixer (and kmix) only allows me one input stream. So:
3.1 Is the manual misleading or have I misread it?
Register 1A allows to select one of the various input sources. One of them is the stereo mixer output, i.e., the same data that is output to the speakers and that can contain the data of several inputs.
3.3 Is the driver assuming a old layout which fits most of the new audio chip layout but not all? (This is really a question about what sort of warnings/advice should my write up include).
The AC'97 code assumes that codecs conform to the AC'97 specification.
However, mixer controls can be added, removed, or renamed by codec- specific code in snd-ac97-codec or by mainboard-specific code in the driver. This code is continually changed and updated because every mainboard out there seems to be wired differently.
Regards, Clemens
participants (4)
-
Clemens Ladisch
-
David Webb
-
Takashi Iwai
-
Tobin Davis