2008/10/8 Anders Eriksson
zajec5@gmail.com said:
I guess it's Alsa that detects audio device on GPU and transferrs audio to it (for example by setting "device" in MPlayer). Aha. So Alsa does this already today? It's just that it never leaves the card? Right. That's what patch introduces: it let audio "leave the card" :)
But radeonhd has to enable this audio output in HDMI and set timing registers. Try to use "mplayer -ao alse:device=hw=X.Y" WITHOUT HDMI connected. What should X and Y be? Type command: aplay -l (-l is small L) You will find something like card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI] so in this case X is 1 and Y is 3: mplayer -ao alse:device=hw=1.3
1. Switching to other VT and back kills playing Audio. The key word here is "back". When I switch to console audio stops playing - that's fine. But when I switch again to X I expect audio to resume playing. Ok. Then we have different expectations. I expect audio to be orthogonal to the VT selection. If anything it's a _policy_ decision if you want to have "audio follows VT selection". It shouldn't be enforced by the architecture. Don't know if this is even possible. Let's wait for Christian's answer.
Fianlly I also do not understand you :) You're happy to test it, but does it actually work for you?
Remains to be seen. I'm happy to test it after work. We'll see what comes out of it. OK, let us know later please. If you don't want to play with all that -ao alsa:device=hw=X.Y you may use SMPlayer from SVN (probably need to compile yourself). It allows you to select alsa device in Preferences.
Making an audio driver inside the X driver just seems odd to me. As I said it's not standard audio driver. It just plays with registers on GPU to let audio be transmitted thought HDMI. The real audio driver is still Alsa.
How come all of this is not in the kernel? Together with e.g. modesetting? Don't ask me :)
-- Rafał Miłecki