hw_params()
Quoted 2 lines · Giuliano Pochini
hw_params()callback may be called multiple times. Is it guaranteed that before the second, third... callhw_free()is called ?
Nope. The hw_free call is optional. It's only explicitly called in close().
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
hw_params() callback may be called multiple times. Is it guaranteed that before the second, third... call hw_free() is called ?
Bye.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
More than stereo (4 channels in my case)
In a related project I used OSS (even paid for it) and got did a program that played 4 channel sound files (of my own making). On that project I had a CMI sound chip (CMI 8738). To get the thing to work properly (the back two playback channels on the "line in" jack, I needed to have a special mixer control set, and used ossmix to do the job "ossmix misc.rear2lin on".
Fast forward to my current configuration: VIA SouthBridge chip audio, VT8233 (Vendor 1106, Device 3059, Rev 50, from /sbin/lspci). I'd like to do the same thing. Now I've read quite a few of the examples and my attempts to make some sense out of 'amixer' and 'aplay' are frustrating me quite a bit. I've got 0.9.2 alsa, and a couple of problems:
1) The sound in the right channel has a lot of hash. One time (god knows what I did) it seemed to play OK. I'm using 44.1 kHz sample files (if that makes a difference), since the source code seems to want 48kHz (or so I surmise).
2) The rear channels are nowhere to be found. I suspect that I need to turn on some switch in the mixer, but which one is becoming a mystery to me.
Eventually I'll be moving to a different sound card (a Turtle Beach Santa Cruz), then another one. I suspect that some of the same problems might continue, so I'd like to solve them here first. Any/all suggestions would be welcome.
p.s. While I will convert to alsa, will the OSS stuff work in emulation?? Will I have similar controls available like the misc.rear2lin mentioned above?? Is there any way I can put them into the OSS emulation stuff?? I'd be willing to do so.
Thanks.
=====
Signature · 13 lines
Tom Watson [email protected] __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Re: More than stereo (4 channels in my case)
Quoted 25 lines · Tom Watson
In a related project I used OSS (even paid for it) and got did a program that played 4 channel sound files (of my own making). On that project I had a CMI sound chip (CMI 8738). To get the thing to work properly (the back two playback channels on the "line in" jack, I needed to have a special mixer control set, and used ossmix to do the job "ossmix misc.rear2lin on".
Fast forward to my current configuration: VIA SouthBridge chip audio, VT8233 (Vendor 1106, Device 3059, Rev 50, from
/sbin/lspci). I'd like to do the same thing. Now I've read quite a few of the examples and my attempts to make some sense out of 'amixer' and 'aplay' are frustrating me quite a bit. I've got 0.9.2 alsa, and a couple of problems:
1) The sound in the right channel has a lot of hash. One time (god knows what I did) it seemed to play OK. I'm using 44.1 kHz sample files (if that makes a difference), since the source code seems to want 48kHz (or so I surmise).
2) The rear channels are nowhere to be found. I suspect that I need to turn on some switch in the mixer, but which one is becoming a mystery to me.Eventually I'll be moving to a different sound card (a Turtle Beach Santa Cruz), then another one. I suspect that some of the same problems might continue, so I'd like to solve them here first. Any/all suggestions would be welcome.
Quoted 10 lines
p.s. While I will convert to alsa, will the OSS stuff work in emulation?? Will I have similar controls available like the misc.rear2lin mentioned above?? Is there any way I can put them into the OSS emulation stuff?? I'd be willing to do so.
Thanks.
=====
Although I do not have your sound card, I have a SB Live, and in order to get sound coming out of different speakers, one just uses a different device name at snd_pcm_open. E.g. "front" for front speaker stereo,
"rear" for rear speaker stereo,
"surround40" for 4-channel surround. (front and rear together)
"surround51" for 5.1 Surround. (front, rear, center and SubWoofer)
"default" for the same sound copied to all speakers.
All these device "aliases" are already set up for the sb live. You might have to configure some alsa config files to get them to be the same for your sound card. All the alsa config files I have are in /usr/share/alsa and /usr/share/alsa/pcm
Cheers
James
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Re: More than stereo (4 channels in my case)
In reply to Tom WatsonAt Sun, 27 Apr 2003 01:02:49 -0700 (PDT),
Quoted 7 lines · Tom Watson
In a related project I used OSS (even paid for it) and got did a program that played 4 channel sound files (of my own making). On that project I had a CMI sound chip (CMI 8738). To get the thing to work properly (the back two playback channels on the "line in" jack, I needed to have a special mixer control set, and used ossmix to do the job "ossmix misc.rear2lin on".
you can toggle this via alsamixer on the fly. check alsa-kernel/Documentation/CMIPCI.txt for details.
Quoted 9 lines
Fast forward to my current configuration: VIA SouthBridge chip audio, VT8233 (Vendor 1106, Device 3059, Rev 50, from
/sbin/lspci). I'd like to do the same thing. Now I've read quite a few of the examples and my attempts to make some sense out of 'amixer' and 'aplay' are frustrating me quite a bit. I've got 0.9.2 alsa, and a couple of problems:
1) The sound in the right channel has a lot of hash. One time (god knows what I did) it seemed to play OK. I'm using 44.1 kHz sample files (if that makes a difference), since the source code seems to want 48kHz (or so I surmise).
it looks like a bug of AWARD BIOS.
i'll put a workaround soon to cvs.
Quoted 3 lines
2) The rear channels are nowhere to be found. I suspect that I need to turn on some switch in the mixer, but which one is becoming a mystery to me.
the multi-channel is supported on the second pcm device. the first pcm device is so-called "direct sound" pcm, and supports up to 4 playbacks at the same time but only for two channels.
for 4-channel output, there is no special configuration. (you need to adjust "Surround" volumes, though.) depending on the board, you might need to toggle some switches to configure the line-in as rear output.
Quoted 4 lines
Eventually I'll be moving to a different sound card (a Turtle Beach Santa Cruz), then another one. I suspect that some of the same problems might continue, so I'd like to solve them here first. Any/all suggestions would be welcome.
is it cs46xx? then it should work. just raise the surround volume as above.
Quoted 4 lines
p.s. While I will convert to alsa, will the OSS stuff work in emulation?? Will I have similar controls available like the misc.rear2lin mentioned above?? Is there any way I can put them into the OSS emulation stuff?? I'd be willing to do so.
so far, no. using amixer (or alsamixer) wouldn't suffice?
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Re: More than stereo (4 channels in my case)
Quoted 7 lines · --- Takashi Iwai
At Sun, 27 Apr 2003 01:02:49 -0700 (PDT),
Quoted 3 lines · Tom Watson
In a related project I used OSS (even paid for it) and got did a program that played 4 channel sound files (of my own making). On
that
Quoted 1 line
project I had a CMI sound chip (CMI 8738). To get the thing to
Quoted 8 lines
work
Quoted 2 lines
properly (the back two playback channels on the "line in" jack, I needed to have a special mixer control set, and used ossmix to do
the
Quoted 1 line
job "ossmix misc.rear2lin on".
you can toggle this via alsamixer on the fly. check
alsa-kernel/Documentation/CMIPCI.txtfor details.
WOW!! Documentation. This is VERY helpful for getting the settings right for the mixer controls. In particular, it explains the "copy front to rear" (oss: misc.4spk) and "rear output is line in jack" (oss:misc.rear2lin).
Quoted 11 lines
Quoted 2 lines
Fast forward to my current configuration: VIA SouthBridge chip
audio,
Quoted 1 line
VT8233 (Vendor 1106, Device 3059, Rev 50, from
/sbin/lspci). I'dlike
Quoted 1 line
to do the same thing. Now I've read quite a few of the examples
and my
Quoted 1 line
attempts to make some sense out of 'amixer' and 'aplay' are
frustrating
Quoted 2 lines
me quite a bit. I've got 0.9.2 alsa, and a couple of problems:
1) The sound in the right channel has a lot of hash. One time
Quoted 8 lines
(god
Quoted 2 lines
knows what I did) it seemed to play OK. I'm using 44.1 kHz sample files (if that makes a difference), since the source code seems to
want
Quoted 1 line
48kHz (or so I surmise).
it looks like a bug of AWARD BIOS.
i'll put a workaround soon to cvs.
Just curious, what was/is the problem?? Somehow I could get it to come and go.
Quoted 6 lines
Quoted 2 lines
2) The rear channels are nowhere to be found. I suspect that I
need
Quoted 2 lines
to turn on some switch in the mixer, but which one is becoming a mystery to me.
Quoted 8 lines
the multi-channel is supported on the second pcm device. the first pcm device is so-called "direct sound" pcm, and supports up to 4 playbacks at the same time but only for two channels.
for 4-channel output, there is no special configuration. (you need to adjust "Surround" volumes, though.) depending on the board, you might need to toggle some switches to configure the line-in as rear output.
OK, this is nice, but I'd like to know how to shift them using the 'amixer' program. Is there an equivalent set of documentation like the CMI8738 documentation (CMPPCI.txt) that explains the mixer controls as detailed. Also, why aren't the mixer controls (these are both AC'97 audio goodies) similar for similar functions. This would be a GREAT bonus, as the command line stuff could go from platform to platform.
Quoted 10 lines
Quoted 3 lines
Eventually I'll be moving to a different sound card (a Turtle Beach Santa Cruz), then another one. I suspect that some of the same
problems
Quoted 2 lines
might continue, so I'd like to solve them here first. Any/all suggestions would be welcome.
is it cs46xx? then it should work. just raise the surround volume as
above.
Yup, it is a cs46xx chip, ought to be OK. I have yet to try it though.
That's next on the list.
Quoted 8 lines
Quoted 4 lines
p.s. While I will convert to alsa, will the OSS stuff work in emulation?? Will I have similar controls available like the misc.rear2lin mentioned above?? Is there any way I can put them
into
Quoted 1 line
the OSS emulation stuff?? I'd be willing to do so.
so far, no. using amixer (or alsamixer) wouldn't suffice?
Yes, it would. My "problem" (yes I need to read more!!) is that the OSS mixer command line control goodie (ossmix) was pretty simple to understand. The program 'amixer' while it does more is a bit more difficult to understand.
By the way... Just how does the mapping from alsa controls to oss controls happen? Is this unique for each chip, or a general thing??
Maybe if we have some knowledge of each it would be easier to understand.
Quoted 4 lines
Takashi
Thanks so much. All of this is very informative.
=====
Signature · 13 lines
Tom Watson [email protected] __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf