All of lore.kernel.org
 help / color / mirror / Atom feed
* possible ALSA bug/feature (was: important recording broke. why?) (fwd)
@ 2003-03-21 14:16 Kai Vehmanen
  2003-03-22 21:43 ` Laurent Georget
  2003-03-25 18:01 ` Takashi Iwai
  0 siblings, 2 replies; 16+ messages in thread
From: Kai Vehmanen @ 2003-03-21 14:16 UTC (permalink / raw)
  To: alsa-devel; +Cc: The Eye

Hi,

first please read the mail to ecasound-list below. 

It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
returns -EIO even though documentation says nothing about this. After some
testing this seems to not happen on direct hw-access, only with
the pcm_plugin. The EIO comes from snd_pcm_wait(). 

Is this a bug or or a feature?

Btw; the error does not seem to be critical. If I handle
     the EIO the same way as EPIPE (i.e. run xrun 
     handling code), the recording will continue fine.

---------- Forwarded message ----------
Date: Fri, 21 Mar 2003 12:45:53 +0000
From: The Eye <the.eye@gmx.li>
Reply-To: ecasound-list@wakkanet.fi
To: ecasound-list@wakkanet.fi
Subject: [ecasound] important recording broke. why?

Yesterday I had an important recording (a radio-show I did) ... I had it
scheduled via at, the same command I always use, i.e.
ecasound -b:2048 -z:intbuf -z:db,200000 -r -ev -t:8400 -f:s16_le,2,44100 
-i:alsa,default -o:laermraw.raw


OK, this has always worked ... now I read my mails today, and what do I
see in my inbox? the following:
****************************************************************************
*               ecasound v2.2.2-pre1 (C) 1997-2003 Kai Vehmanen                
****************************************************************************
- [ Session created ] ------------------------------------------------------
- [ Chainsetup created (cmdline) ] -----------------------------------------
(eca-chainsetup-parser) Setting buffersize to (samples) 2048.
(eca-chainsetup-parser) Enabling extra buffering on realtime devices.
(eca-chainsetup-parser) Using double-buffer of 200000 sample frames.
(eca-chainsetup) Raised-priority mode enabled. (prio:50)
(eca-chainsetup-parser) Set processing time to 8400.00.
- [ Connecting chainsetup ] ------------------------------------------------
(eca-chainsetup) 'rt' buffering mode selected.
(eca-chainsetup) Audio object "alsa", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
(eca-chainsetup) Audio object "laermraw.raw", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
- [ Chainsetup connected ] -------------------------------------------------
(eca-controller) Connected chainsetup:  "command-line-setup".
- [ Controller/Starting batch processing ] ---------------------------------
- [ Engine init - Driver start ] -------------------------------------------
(eca-engine) Prefilling i/o buffers.
(audioio-alsa) warning! playback overrun - samples lost!  Break was at least 
0.05 ms long.
(audioio-alsa) Read error! Stopping operation.
Warning: DBC_REQUIRE failed - "samples_read >= 0", samplebuffer.cpp, 757.
sh: line 61:  2821 Segmentation fault      ecasound -b:2048 -z:intbuf 
-z:db,200000 -r -ev -t:8400 -f:s16_le,2,44100 -i:alsa,default -o:laermraw.raw



is this a bug? btw this happened after approx. 2 minutes of recording ..

since I myself wasn't present (I was in the studio, doing the radio show
that should have been recorded), the recording is of course lost .. darn!

-- 
Michael Hellwig  aka  The Eye                 olymp.idle.at admin
check out http://homepage.uibk.ac.at/~csaa5128 for gpg public key
        and don't hesitate to look at http://laerm.or.at

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request@wakkanet.fi>.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: possible ALSA bug/feature (was: important recording broke. why?) (fwd)
  2003-03-21 14:16 possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
@ 2003-03-22 21:43 ` Laurent Georget
  2003-03-25 18:01 ` Takashi Iwai
  1 sibling, 0 replies; 16+ messages in thread
From: Laurent Georget @ 2003-03-22 21:43 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: alsa-devel

I reported sometimes ago the same problem with alsa "level" and "ameter" 
plugins:
After 0.9rc7 , using these plugin fails ( EIO  )  , if buffer size is low.

There is now an additional checking in pcm_wait (pcm.c line 2017 ) , 
that came after 0.9rc7:
if (revents & (POLLERR | POLLNVAL))
		return -EIO;

Commenting out POLLER|  "solves" the problem .

As i am far from being a top developper, I wonder if this new checking 
is really needed,
and , if it is,  do you think that the error could be solved in the 
plugin code ?

Thanks

Laurent


Kai Vehmanen wrote:
> Hi,
> 
> first please read the mail to ecasound-list below. 
> 
> It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
> returns -EIO even though documentation says nothing about this. After some
> testing this seems to not happen on direct hw-access, only with
> the pcm_plugin. The EIO comes from snd_pcm_wait(). 
> 
> Is this a bug or or a feature?
> 
> Btw; the error does not seem to be critical. If I handle
>      the EIO the same way as EPIPE (i.e. run xrun 
>      handling code), the recording will continue fine.
> 



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: possible ALSA bug/feature (was: important recording broke. why?) (fwd)
  2003-03-21 14:16 possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
  2003-03-22 21:43 ` Laurent Georget
@ 2003-03-25 18:01 ` Takashi Iwai
       [not found]   ` <3E80CB2E.7070204@club-internet.fr>
  2003-03-27  0:42   ` possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
  1 sibling, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2003-03-25 18:01 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: alsa-devel, The Eye

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

At Fri, 21 Mar 2003 16:16:04 +0200 (EET),
Kai Vehmanen wrote:
> 
> Hi,
> 
> first please read the mail to ecasound-list below. 
> 
> It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
> returns -EIO even though documentation says nothing about this. After some
> testing this seems to not happen on direct hw-access, only with
> the pcm_plugin. The EIO comes from snd_pcm_wait(). 
> 
> Is this a bug or or a feature?

i also don't know whether Jaroslav added as a feature or as an
unexpected bug.  anyway, this means that the poll failed and the pcm
status is abnormal, typically xruns...

how about the attached patch?  (untested)


Takashi

[-- Attachment #2: pcm-poll-err-fix.dif --]
[-- Type: application/octet-stream, Size: 666 bytes --]

Index: alsa-lib/src/pcm/pcm.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm.c,v
retrieving revision 1.130
diff -u -r1.130 pcm.c
--- alsa-lib/src/pcm/pcm.c	20 Mar 2003 11:06:13 -0000	1.130
+++ alsa-lib/src/pcm/pcm.c	25 Mar 2003 18:00:13 -0000
@@ -6110,9 +6110,15 @@
 			}
 
 			err = snd_pcm_wait(pcm, -1);
-			if (err < 0)
-				break;
 			state = snd_pcm_state(pcm);
+			if (err < 0) {
+				/* check more precisely */
+				if (state == SND_PCM_STATE_XRUN)
+					err = -EPIPE;
+				else if (state == SND_PCM_STATE_SUSPENDED)
+					err = -ESTRPIPE;
+				break;
+			}
 			goto _again;
 			
 		}

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: possible ALSA bug/feature (was: important recording broke. why?) (fwd)
       [not found]     ` <s5hznnio0ml.wl@alsa2.suse.de>
@ 2003-03-26 20:53       ` Laurent Georget
  2003-03-27 11:27         ` Mono to stereo ? Giuliano Pochini
  0 siblings, 1 reply; 16+ messages in thread
From: Laurent Georget @ 2003-03-26 20:53 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel

Takashi Iwai wrote:
> At Tue, 25 Mar 2003 22:33:34 +0100,
> Laurent Georget wrote:
> 
>>Takashi Iwai wrote:
>>
>>>At Fri, 21 Mar 2003 16:16:04 +0200 (EET),
>>>Kai Vehmanen wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>first please read the mail to ecasound-list below. 
>>>>
>>>>It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
>>>>returns -EIO even though documentation says nothing about this. After some
>>>>testing this seems to not happen on direct hw-access, only with
>>>>the pcm_plugin. The EIO comes from snd_pcm_wait(). 
>>>>
>>>>Is this a bug or or a feature?
>>>
>>>
>>>i also don't know whether Jaroslav added as a feature or as an
>>>unexpected bug.  anyway, this means that the poll failed and the pcm
>>>status is abnormal, typically xruns...
>>>
>>>how about the attached patch?  (untested)
>>>
>>>
>>>Takashi
>>
>>Hello!
>>
>>The problem I posted about is , I think, the same than Kai Vehmanem 
>>tells about here, but  with Alsa level plugins
>>(the plugin from Abramo, and Ameter from me (well , 95% of  the code is 
>>from Abramo and Steve Harris)
>>
>>After 0.9rc7 , using level or ameter plugin with low (but valid) buffer 
>>size gives an IO error :
>>
>>aplay -D level -B 10000 -v test.wav
>>....
>>aplay: pcm_write:1025: write error: Input/output error
> 
> 
> ah, i forgot to tell that it was the fix for the capture.
> 
> for playback, you'll need to fix snd_pcm_write_areas() as well.
> the patch attached below.  please give a try.
> 
> 
> ciao,
> 
> Takashi

I applied the 2 patches : now it is ok for playing and recording with 
any buffersize.
Very cool !

Laurent



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: possible ALSA bug/feature (was: important recording broke. why?) (fwd)
  2003-03-25 18:01 ` Takashi Iwai
       [not found]   ` <3E80CB2E.7070204@club-internet.fr>
@ 2003-03-27  0:42   ` Kai Vehmanen
  2003-03-27  9:15     ` Takashi Iwai
  1 sibling, 1 reply; 16+ messages in thread
From: Kai Vehmanen @ 2003-03-27  0:42 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, The Eye

On Tue, 25 Mar 2003, Takashi Iwai wrote:

>> It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
>> returns -EIO even though documentation says nothing about this. After some
> i also don't know whether Jaroslav added as a feature or as an
> unexpected bug.  anyway, this means that the poll failed and the pcm
> status is abnormal, typically xruns...
[...]
> how about the attached patch?  (untested)

Works fine here - no more -EIOs and recording is ultra-reliable again! :)

-- 
 http://www.eca.cx
 Audio software for Linux!



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: possible ALSA bug/feature (was: important recording broke. why?) (fwd)
  2003-03-27  0:42   ` possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
@ 2003-03-27  9:15     ` Takashi Iwai
  0 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2003-03-27  9:15 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: alsa-devel, The Eye, Laurent Georget

At Thu, 27 Mar 2003 02:42:32 +0200 (EET),
Kai Vehmanen wrote:
> 
> On Tue, 25 Mar 2003, Takashi Iwai wrote:
> 
> >> It seems that with newer ALSA versions, snd_pcm_read[in]()  sometimes
> >> returns -EIO even though documentation says nothing about this. After some
> > i also don't know whether Jaroslav added as a feature or as an
> > unexpected bug.  anyway, this means that the poll failed and the pcm
> > status is abnormal, typically xruns...
> [...]
> > how about the attached patch?  (untested)
> 
> Works fine here - no more -EIOs and recording is ultra-reliable again! :)

ok, now the patch is checked in to cvs.
thanks for your tests!


Takashi


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Mono  to stereo ?
  2003-03-26 20:53       ` Laurent Georget
@ 2003-03-27 11:27         ` Giuliano Pochini
  2003-03-27 11:43           ` Paul Davis
  0 siblings, 1 reply; 16+ messages in thread
From: Giuliano Pochini @ 2003-03-27 11:27 UTC (permalink / raw)
  To: alsa-devel


When an application opens a mono substream, the sound has to
be sent to one channel only or must the low level driver
transparently convert it to stereo ?


Bye.



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-27 11:27         ` Mono to stereo ? Giuliano Pochini
@ 2003-03-27 11:43           ` Paul Davis
  2003-03-28  3:14             ` Manuel Jander
  0 siblings, 1 reply; 16+ messages in thread
From: Paul Davis @ 2003-03-27 11:43 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

>When an application opens a mono substream, the sound has to
>be sent to one channel only or must the low level driver
>transparently convert it to stereo ?

one channel only.

in ALSA, low level drivers do not do any kind of format
conversion. that is accomplished (if necessary) by code running in
user-space, typically part of alsa-lib. the low level driver simply
advertises the capabilities of the hardware, provides ways to use
those capabilities, and lets the midlevel code and alsa-lib do the rest.

--p



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28  3:14             ` Manuel Jander
@ 2003-03-28  2:46               ` Paul Davis
  2003-03-28  9:21                 ` Giuliano Pochini
  2003-03-28 10:02               ` Takashi Iwai
  1 sibling, 1 reply; 16+ messages in thread
From: Paul Davis @ 2003-03-28  2:46 UTC (permalink / raw)
  To: Manuel Jander; +Cc: alsa-devel

>>>When an application opens a mono substream, the sound has to
>>>be sent to one channel only or must the low level driver
>>>transparently convert it to stereo ?
>>>    
>>>
>>
>>one channel only.
>>
>>in ALSA, low level drivers do not do any kind of format
>>conversion. that is accomplished (if necessary) by code running in
>>user-space, typically part of alsa-lib. the low level driver simply
>>advertises the capabilities of the hardware, provides ways to use
>>those capabilities, and lets the midlevel code and alsa-lib do the rest.
>>  
>>
>
>...but, if you are doing mono playback, your sound driver has to setup
>your soundcard to playback on both channels the same mono channel. The 
>Vortex
>driver (still not in the main branch) for example splits the mono signal 
>on its internal
>mixer into 2 identical signals which are feed one into each CODEC channels.

that's a driver author's design decision. if the "hw" PCM device is
opened with a single channel, it would be equally valid to play on one
channel only. if the h/w can't handle that, it should not
advertise itself to be capable of mono operation. IMHO.

--p



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-27 11:43           ` Paul Davis
@ 2003-03-28  3:14             ` Manuel Jander
  2003-03-28  2:46               ` Paul Davis
  2003-03-28 10:02               ` Takashi Iwai
  0 siblings, 2 replies; 16+ messages in thread
From: Manuel Jander @ 2003-03-28  3:14 UTC (permalink / raw)
  To: alsa-devel

Hi,

Paul Davis wrote:

>>When an application opens a mono substream, the sound has to
>>be sent to one channel only or must the low level driver
>>transparently convert it to stereo ?
>>    
>>
>
>one channel only.
>
>in ALSA, low level drivers do not do any kind of format
>conversion. that is accomplished (if necessary) by code running in
>user-space, typically part of alsa-lib. the low level driver simply
>advertises the capabilities of the hardware, provides ways to use
>those capabilities, and lets the midlevel code and alsa-lib do the rest.
>  
>

...but, if you are doing mono playback, your sound driver has to setup
your soundcard to playback on both channels the same mono channel. The 
Vortex
driver (still not in the main branch) for example splits the mono signal 
on its internal
mixer into 2 identical signals which are feed one into each CODEC channels.

Best Regards

Manuel Jander

>--p
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by:
>The Definitive IT and Networking Event. Be There!
>NetWorld+Interop Las Vegas 2003 -- Register today!
>http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
>_______________________________________________
>Alsa-devel mailing list
>Alsa-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
>.
>
>  
>




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28  2:46               ` Paul Davis
@ 2003-03-28  9:21                 ` Giuliano Pochini
  0 siblings, 0 replies; 16+ messages in thread
From: Giuliano Pochini @ 2003-03-28  9:21 UTC (permalink / raw)
  To: Paul Davis; +Cc: alsa-devel, Manuel Jander


On 28-Mar-2003 Paul Davis wrote:
>>>one channel only.
>>>[...]
>>
>>...but, if you are doing mono playback, your sound driver has to setup
>>your soundcard to playback on both channels the same mono channel. The
>>Vortex
>>driver (still not in the main branch) for example splits the mono signal
>>on its internal
>>mixer into 2 identical signals which are feed one into each CODEC channels.
>
> that's a driver author's design decision. if the "hw" PCM device is
> opened with a single channel, it would be equally valid to play on one
> channel only. if the h/w can't handle that, it should not
> advertise itself to be capable of mono operation. IMHO.

I choosed to send the sound to one channel only, so the apps can
use all 8 mono channels.
Since most cards can do mono to stereo in hardware, I would be nice to
add a capability flag for that. Using that features you halve memory
usage for buffers and irq frequency.


Bye.



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28  3:14             ` Manuel Jander
  2003-03-28  2:46               ` Paul Davis
@ 2003-03-28 10:02               ` Takashi Iwai
  2003-03-28 10:14                 ` Jaroslav Kysela
  2003-03-28 16:21                 ` Jeff Muizelaar
  1 sibling, 2 replies; 16+ messages in thread
From: Takashi Iwai @ 2003-03-28 10:02 UTC (permalink / raw)
  To: Manuel Jander; +Cc: alsa-devel

At Thu, 27 Mar 2003 23:14:22 -0400,
Manuel Jander wrote:
> 
> Hi,
> 
> Paul Davis wrote:
> 
> >>When an application opens a mono substream, the sound has to
> >>be sent to one channel only or must the low level driver
> >>transparently convert it to stereo ?
> >>    
> >>
> >
> >one channel only.
> >
> >in ALSA, low level drivers do not do any kind of format
> >conversion. that is accomplished (if necessary) by code running in
> >user-space, typically part of alsa-lib. the low level driver simply
> >advertises the capabilities of the hardware, provides ways to use
> >those capabilities, and lets the midlevel code and alsa-lib do the rest.
> >  
> >
> 
> ...but, if you are doing mono playback, your sound driver has to setup
> your soundcard to playback on both channels the same mono channel. The 
> Vortex
> driver (still not in the main branch) for example splits the mono signal 
> on its internal
> mixer into 2 identical signals which are feed one into each CODEC channels.

no, please don't do that.
in the ALSA, instead of the lowlevel driver, alsa-lib (and
oss-emulation module) will do this job.

the driver is supposed to inform exactly what it supports.
in this case, both channels_min and channels_max will be 2.
the difference of configuration will be absorbed by the plug-in of 
alsa-lib and oss-emulation module.


ciao,

Takashi


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28 10:02               ` Takashi Iwai
@ 2003-03-28 10:14                 ` Jaroslav Kysela
  2003-03-28 16:21                 ` Jeff Muizelaar
  1 sibling, 0 replies; 16+ messages in thread
From: Jaroslav Kysela @ 2003-03-28 10:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Manuel Jander, alsa-devel@lists.sourceforge.net

On Fri, 28 Mar 2003, Takashi Iwai wrote:

> At Thu, 27 Mar 2003 23:14:22 -0400,
> Manuel Jander wrote:
> > 
> > Hi,
> > 
> > Paul Davis wrote:
> > 
> > >>When an application opens a mono substream, the sound has to
> > >>be sent to one channel only or must the low level driver
> > >>transparently convert it to stereo ?
> > >>    
> > >>
> > >
> > >one channel only.
> > >
> > >in ALSA, low level drivers do not do any kind of format
> > >conversion. that is accomplished (if necessary) by code running in
> > >user-space, typically part of alsa-lib. the low level driver simply
> > >advertises the capabilities of the hardware, provides ways to use
> > >those capabilities, and lets the midlevel code and alsa-lib do the rest.
> > >  
> > >
> > 
> > ...but, if you are doing mono playback, your sound driver has to setup
> > your soundcard to playback on both channels the same mono channel. The 
> > Vortex
> > driver (still not in the main branch) for example splits the mono signal 
> > on its internal
> > mixer into 2 identical signals which are feed one into each CODEC channels.
> 
> no, please don't do that.
> in the ALSA, instead of the lowlevel driver, alsa-lib (and
> oss-emulation module) will do this job.
> 
> the driver is supposed to inform exactly what it supports.
> in this case, both channels_min and channels_max will be 2.
> the difference of configuration will be absorbed by the plug-in of 
> alsa-lib and oss-emulation module.

In other words: Keep the lowlevel driver code as simple as possible....

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28 10:02               ` Takashi Iwai
  2003-03-28 10:14                 ` Jaroslav Kysela
@ 2003-03-28 16:21                 ` Jeff Muizelaar
  2003-03-28 16:43                   ` Takashi Iwai
  1 sibling, 1 reply; 16+ messages in thread
From: Jeff Muizelaar @ 2003-03-28 16:21 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Manuel Jander, alsa-devel

Takashi Iwai wrote:

>At Thu, 27 Mar 2003 23:14:22 -0400,
>Manuel Jander wrote:
>  
>
>>...but, if you are doing mono playback, your sound driver has to setup
>>your soundcard to playback on both channels the same mono channel. The 
>>Vortex
>>driver (still not in the main branch) for example splits the mono signal 
>>on its internal
>>mixer into 2 identical signals which are feed one into each CODEC channels.
>>    
>>
>
>no, please don't do that.
>in the ALSA, instead of the lowlevel driver, alsa-lib (and
>oss-emulation module) will do this job.
>
In this case the card (not driver) is spliting the mono signal and 
sending it to both right and left channels of the codec. Thus 
channels_min should still be 1 because the card does actually support a 
single channel

>the driver is supposed to inform exactly what it supports.
>in this case, both channels_min and channels_max will be 2.
>the difference of configuration will be absorbed by the plug-in of 
>alsa-lib and oss-emulation module.
>  
>

-Jeff




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28 16:21                 ` Jeff Muizelaar
@ 2003-03-28 16:43                   ` Takashi Iwai
  2003-03-28 17:15                     ` Jeff Muizelaar
  0 siblings, 1 reply; 16+ messages in thread
From: Takashi Iwai @ 2003-03-28 16:43 UTC (permalink / raw)
  To: Jeff Muizelaar; +Cc: Manuel Jander, alsa-devel

At Fri, 28 Mar 2003 11:21:04 -0500,
Jeff Muizelaar wrote:
> 
> Takashi Iwai wrote:
> 
> >At Thu, 27 Mar 2003 23:14:22 -0400,
> >Manuel Jander wrote:
> >  
> >
> >>...but, if you are doing mono playback, your sound driver has to setup
> >>your soundcard to playback on both channels the same mono channel. The 
> >>Vortex
> >>driver (still not in the main branch) for example splits the mono signal 
> >>on its internal
> >>mixer into 2 identical signals which are feed one into each CODEC channels.
> >>    
> >>
> >
> >no, please don't do that.
> >in the ALSA, instead of the lowlevel driver, alsa-lib (and
> >oss-emulation module) will do this job.
> >
> In this case the card (not driver) is spliting the mono signal and 
> sending it to both right and left channels of the codec. Thus 
> channels_min should still be 1 because the card does actually support a 
> single channel

hmm, which driver do you mean?  from the above context, i read that
the driver needs to split the signals by itself...


Takashi


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Mono to stereo ?
  2003-03-28 16:43                   ` Takashi Iwai
@ 2003-03-28 17:15                     ` Jeff Muizelaar
  0 siblings, 0 replies; 16+ messages in thread
From: Jeff Muizelaar @ 2003-03-28 17:15 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Manuel Jander, alsa-devel

Takashi Iwai wrote:

>At Fri, 28 Mar 2003 11:21:04 -0500,
>Jeff Muizelaar wrote:
>  
>
>>Takashi Iwai wrote:
>>
>>    
>>
>>>At Thu, 27 Mar 2003 23:14:22 -0400,
>>>Manuel Jander wrote:
>>> 
>>>
>>>      
>>>
>>>>...but, if you are doing mono playback, your sound driver has to setup
>>>>your soundcard to playback on both channels the same mono channel. The 
>>>>Vortex
>>>>driver (still not in the main branch) for example splits the mono signal 
>>>>on its internal
>>>>
                     ^^ By this Manuel means the mixer internal to the 
card not internal to the driver.

>>>>mixer into 2 identical signals which are feed one into each CODEC channels.
>>>>   
>>>>
>>>>        
>>>>
>>>no, please don't do that.
>>>in the ALSA, instead of the lowlevel driver, alsa-lib (and
>>>oss-emulation module) will do this job.
>>>
>>>      
>>>
>>In this case the card (not driver) is spliting the mono signal and 
>>sending it to both right and left channels of the codec. Thus 
>>channels_min should still be 1 because the card does actually support a 
>>single channel
>>    
>>
>
>hmm, which driver do you mean?  from the above context, i read that
>the driver needs to split the signals by itself...
>  
>
The vortex driver. Yeah rereading it, i understand how you interpreted it.

-Jeff



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-03-28 17:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-21 14:16 possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
2003-03-22 21:43 ` Laurent Georget
2003-03-25 18:01 ` Takashi Iwai
     [not found]   ` <3E80CB2E.7070204@club-internet.fr>
     [not found]     ` <s5hznnio0ml.wl@alsa2.suse.de>
2003-03-26 20:53       ` Laurent Georget
2003-03-27 11:27         ` Mono to stereo ? Giuliano Pochini
2003-03-27 11:43           ` Paul Davis
2003-03-28  3:14             ` Manuel Jander
2003-03-28  2:46               ` Paul Davis
2003-03-28  9:21                 ` Giuliano Pochini
2003-03-28 10:02               ` Takashi Iwai
2003-03-28 10:14                 ` Jaroslav Kysela
2003-03-28 16:21                 ` Jeff Muizelaar
2003-03-28 16:43                   ` Takashi Iwai
2003-03-28 17:15                     ` Jeff Muizelaar
2003-03-27  0:42   ` possible ALSA bug/feature (was: important recording broke. why?) (fwd) Kai Vehmanen
2003-03-27  9:15     ` Takashi Iwai

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.