Skip to contentSkip to conversation

problems with the mixer (fwd)

DISCUSSION Aner Gusic 2 participants 7 messages May 8, 2004 – May 19, 2004 3 messages not in the archive

lore
Share & tools
lore

Aner Gusic

author
#0 lore raw

Hi!

I didn't get any answer on alsa-user list so I try here.

I have a Hoontech NX card with outputs for front and rear speakers. Volume settings for these I would like to set independently of each other, and this worked just fine while I was running ALSA 0.5.x. However, a couple of days ago I upgraded to ALSA 1.0.3.

Now, there are two possibilities for controling volume settings on speakers, one with "Sigmatel 4-speaker stereo" off and another with this switch turned on.

The second posibility (4-s s on), has following setup:
- "Master" controls front speakers
- "PCM" controls both front and rear speakers

Sigmatel 4-speaker stereo off is almost what I want:
- "Master", "PCM", "PCM Front" control front speakers
- "Surrownd", "PCM Reverb" control rear speakers

However, PCM Front and PCM Reverb are set to 100% resp. 0% each time /dev/dsp is opened. This works perfectly for front speakers since they can be controled with Master or PCM controls, but rear speakers are muted each time a new song starts.

Is this a bug? (I hope it is.) Is it a known bug, or is it some kind of feature I can hope to be able to go around in future release of trident driver?

Regards,

Signature · 10 lines
Aner Gusic,
Linköping
Sweden


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
#1 lore raw

At Sat, 8 May 2004 16:37:06 +0200,

Quoted 23 lines · Aner Gusic

Hi!

I didn't get any answer on alsa-user list so I try here.

I have a Hoontech NX card with outputs for front and rear speakers. Volume settings for these I would like to set independently of each other, and this worked just fine while I was running ALSA 0.5.x. However, a couple of days ago I upgraded to ALSA 1.0.3.

Now, there are two possibilities for controling volume settings on speakers, one with "Sigmatel 4-speaker stereo" off and another with this switch turned on.

The second posibility (4-s s on), has following setup:
- "Master" controls front speakers
- "PCM" controls both front and rear speakers

Sigmatel 4-speaker stereo off is almost what I want:
- "Master", "PCM", "PCM Front" control front speakers
- "Surrownd", "PCM Reverb" control rear speakers

Quoted 8 lines

However, PCM Front and PCM Reverb are set to 100% resp. 0% each time /dev/dsp is opened. This works perfectly for front speakers since they can be controled with Master or PCM controls, but rear speakers are muted each time a new song starts.

Is this a bug? (I hope it is.) Is it a known bug, or is it some kind of feature I can hope to be able to go around in future release of trident driver?

you can use "front", "rear" and "surround40" PCMs. then the volumes and the route should be initialized properly.

--
Takashi Iwai <[email protected]> ALSA Developer - www.alsa-project.org

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

author
#2 lore raw

Re: problems with the mixer

* Takashi Iwai <[email protected]>:

Quoted 2 lines

you can use "front", "rear" and "surround40" PCMs. then the volumes and the route should be initialized properly.

I've tryed playing some samples with aplay combined with -D parameter, e.g. "aplay -Dfront foo.wav". However, what I want is to play a sample on both front and rear speakers, but control the sound level independently, so what remains is the surround40-pcm.

When I try this (-Dsurround40) I get the following message:
aplay: set_params:837: Channels count non available

I've tried reading documentation in alsa-driver source-tree, but it is sparse. No documentation on the homepage that I found covers what I am having problems with. :/ Any suggestions to where I should look? Mostly, it should cover pcm:s, this "routing stuff" and such.

Thanks for your help,
/A

Signature · 10 lines
Aner Gusic,
LiTH
Sweden


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
#3 lore raw

Re: problems with the mixer

At Fri, 14 May 2004 20:05:09 +0200,

Quoted 6 lines · Aner Gusic

* Takashi Iwai <[email protected]>:

Quoted 2 lines

you can use "front", "rear" and "surround40" PCMs. then the volumes and the route should be initialized properly.

Quoted 7 lines

I've tryed playing some samples with aplay combined with -D parameter, e.g. "aplay -Dfront foo.wav". However, what I want is to play a sample on both front and rear speakers, but control the sound level independently, so what remains is the surround40-pcm.

When I try this (-Dsurround40) I get the following message:
aplay: set_params:837: Channels count non available

did you play a 4-channel sample file?

Quoted 4 lines

I've tried reading documentation in alsa-driver source-tree, but it is sparse. No documentation on the homepage that I found covers what I am having problems with. :/ Any suggestions to where I should look? Mostly, it should cover pcm:s, this "routing stuff" and such.

it's not the scope of the driver but the library. you might find some useful info in ALSA wiki page...

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: problems with the mixer

At Tue, 18 May 2004 17:24:54 +0200,

Quoted 8 lines · Aner Gusic

* Takashi Iwai <[email protected]>:

Quoted 1 line

did you play a 4-channel sample file?

Ah, no I didn't. What I want is to play 2-channel samples on both front and rear speakers and to be able to control the volume independently.

doesn't it work like below?

% aplay -Dfront some-2ch.wav
% aplay -Drear some-2ch.wav

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Re: problems with the mixer

At Wed, 19 May 2004 00:13:58 +0200,

Quoted 13 lines · Aner Gusic

* Takashi Iwai <[email protected]>:

Quoted 4 lines

doesn't it work like below?

% aplay -Dfront some-2ch.wav
% aplay -Drear some-2ch.wav

You missunderstood me, I want to use one player to play regular mp3's and be able to hear it on both front and rear speakers. Even if I could sync that thing above it would be a very ugly solution to my problem.

Quoted 4 lines

Så, "aplay some-2ch.wav" works fine, except for the fact that rear volume is initialized to 0. I can get some other routing channels with a swich so rear volume isn't used, but then rear and front volume aren't independent (se my first mail for details) :/ .

ok, then you need something similar like below:

pcm.dup4ch {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			{
				name "Rear Path"
				preserve true
				value true
			}
			{
				name "PCM Reverb Playback Volume"
				index { @func private_pcm_subdevice }
				preserve true
				value 127
			}
		]
	}
}	

then run "aplay -Ddup4ch some-2ch.wav"

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: problems with the mixer

At Wed, 19 May 2004 16:26:48 +0200,

Quoted 10 lines · Aner Gusic

* Takashi Iwai <[email protected]>:

Quoted 3 lines

ok, then you need something similar like below:

pcm.dup4ch {

Finally! Thanks a lot.

Is it possible to make this pcm the default one?

define like the following:

pcm.!default {
	...
}

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click