* problems with mono audio.
@ 2004-03-11 19:10 James Courtier-Dutton
2004-03-11 19:18 ` Jaroslav Kysela
0 siblings, 1 reply; 3+ messages in thread
From: James Courtier-Dutton @ 2004-03-11 19:10 UTC (permalink / raw)
To: alsa-devel
Which devices can a mono stream be played on?
It seems that the only device a mono stream can be played on is the
"default" pcm device.
Devices like "front" and "rear" are stereo only devices.
It would be nice if alsa-lib would open one of these devices, and if the
application tries to set 1 channel instead of 2, then somehow make
alsa-lib do the duplication of the channels.
A similar thing should happen for "surround40" device. If 1 channel is
asked for, alsa-lib should duplicate it for all channels. If 2 channels
are asked for, then alsa-lib should create 4 channels automatically.
alsa-lib seems to manage to do this sort of thing for sample rates, and
sample formats, why not number of channels ?
Cheers
James
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: problems with mono audio.
2004-03-11 19:10 problems with mono audio James Courtier-Dutton
@ 2004-03-11 19:18 ` Jaroslav Kysela
2004-03-11 19:48 ` James Courtier-Dutton
0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2004-03-11 19:18 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
On Thu, 11 Mar 2004, James Courtier-Dutton wrote:
> Which devices can a mono stream be played on?
> It seems that the only device a mono stream can be played on is the
> "default" pcm device.
>
> Devices like "front" and "rear" are stereo only devices.
> It would be nice if alsa-lib would open one of these devices, and if the
> application tries to set 1 channel instead of 2, then somehow make
> alsa-lib do the duplication of the channels.
>
> A similar thing should happen for "surround40" device. If 1 channel is
> asked for, alsa-lib should duplicate it for all channels. If 2 channels
> are asked for, then alsa-lib should create 4 channels automatically.
>
> alsa-lib seems to manage to do this sort of thing for sample rates, and
> sample formats, why not number of channels ?
Have you tried 'plug:front' combination ;-)
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: problems with mono audio.
2004-03-11 19:18 ` Jaroslav Kysela
@ 2004-03-11 19:48 ` James Courtier-Dutton
0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2004-03-11 19:48 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
Jaroslav Kysela wrote:
> On Thu, 11 Mar 2004, James Courtier-Dutton wrote:
>
>
>>Which devices can a mono stream be played on?
>>It seems that the only device a mono stream can be played on is the
>>"default" pcm device.
>>
>>Devices like "front" and "rear" are stereo only devices.
>>It would be nice if alsa-lib would open one of these devices, and if the
>>application tries to set 1 channel instead of 2, then somehow make
>>alsa-lib do the duplication of the channels.
>>
>>A similar thing should happen for "surround40" device. If 1 channel is
>>asked for, alsa-lib should duplicate it for all channels. If 2 channels
>>are asked for, then alsa-lib should create 4 channels automatically.
>>
>>alsa-lib seems to manage to do this sort of thing for sample rates, and
>>sample formats, why not number of channels ?
>
>
> Have you tried 'plug:front' combination ;-)
>
> Jaroslav
>
Yes, I tried all sorts of combinations.
When I play a mono stream to the "front" or "rear" device I get no sound
at all, but the hw_params for 1 channel is accepted, so my application
thinks it should work.
This has been tested with aplay.
The sample file used was recorded with the command: -
arecord -fS16_LE -c1 -r48000 test1.wav
and played back with: -
aplay -Dfront test1.wav
Playing WAVE 'test1.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Cheers
James
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-11 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-11 19:10 problems with mono audio James Courtier-Dutton
2004-03-11 19:18 ` Jaroslav Kysela
2004-03-11 19:48 ` James Courtier-Dutton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.