* [Q] playing / recording mono on a stereo-only hardware @ 2010-01-30 9:49 Guennadi Liakhovetski 2010-01-30 16:29 ` Michael Trimarchi 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-01-30 9:49 UTC (permalink / raw) To: alsa-devel Hi I know this question belongs rather to alsa-users, and I did ask it there, but got no solution so far. Maybe someone here can help. The recently posted SuperH SIU driver only supports stereo playback and capture (channels_min = channels_max = 2). Is there a way to tell alsa-lib to duplicate the mono-channel during playback and to mix recorded channels (or use one of them), if mono recording is requested? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-01-30 9:49 [Q] playing / recording mono on a stereo-only hardware Guennadi Liakhovetski @ 2010-01-30 16:29 ` Michael Trimarchi 2010-01-30 16:45 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Michael Trimarchi @ 2010-01-30 16:29 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: alsa-devel Guennadi Liakhovetski wrote: > Hi > > I know this question belongs rather to alsa-users, and I did ask it there, > but got no solution so far. Maybe someone here can help. > > The recently posted SuperH SIU driver only supports stereo playback and > capture (channels_min = channels_max = 2). Is there a way to tell alsa-lib > to duplicate the mono-channel during playback and to mix recorded channels > (or use one of them), if mono recording is requested? > I'm not an expert but I think that you can use plughw support of alsa-lib pcm.record { type plug slave { pcm record_hw } route_policy average rate_converter "linear" } I think that automatically change rate and channel for supporting mono channel too Michael > Thanks > Guennadi > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-01-30 16:29 ` Michael Trimarchi @ 2010-01-30 16:45 ` Guennadi Liakhovetski [not found] ` <4B683B48.1030707@gandalf.sssup.it> 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-01-30 16:45 UTC (permalink / raw) To: Michael Trimarchi; +Cc: alsa-devel On Sat, 30 Jan 2010, Michael Trimarchi wrote: > Guennadi Liakhovetski wrote: > > Hi > > > > I know this question belongs rather to alsa-users, and I did ask it there, > > but got no solution so far. Maybe someone here can help. > > > > The recently posted SuperH SIU driver only supports stereo playback and > > capture (channels_min = channels_max = 2). Is there a way to tell alsa-lib > > to duplicate the mono-channel during playback and to mix recorded channels > > (or use one of them), if mono recording is requested? > > > I'm not an expert but I think that you can use plughw support of alsa-lib > > pcm.record { > type plug > slave { > pcm record_hw > } > route_policy average > rate_converter "linear" > } > > I think that automatically change rate and channel for supporting mono channel > too Thanks for the snippet, but, I'm afraid, it didn't help either. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <4B683B48.1030707@gandalf.sssup.it>]
* Re: [Q] playing / recording mono on a stereo-only hardware [not found] ` <4B683B48.1030707@gandalf.sssup.it> @ 2010-02-02 14:55 ` Guennadi Liakhovetski 2010-02-02 14:59 ` Michael Trimarchi 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-02 14:55 UTC (permalink / raw) To: Michael Trimarchi; +Cc: alsa-devel (re-adding the list) On Tue, 2 Feb 2010, Michael Trimarchi wrote: > Hi, > > Guennadi Liakhovetski wrote: > > On Sat, 30 Jan 2010, Michael Trimarchi wrote: > > > > > > > Guennadi Liakhovetski wrote: > > > > > > > Hi > > > > > > > > I know this question belongs rather to alsa-users, and I did ask it > > > > there, > > > > but got no solution so far. Maybe someone here can help. > > > > > > > > The recently posted SuperH SIU driver only supports stereo playback and > > > > capture (channels_min = channels_max = 2). Is there a way to tell > > > > alsa-lib > > > > to duplicate the mono-channel during playback and to mix recorded > > > > channels > > > > (or use one of them), if mono recording is requested? > > > > > > > I'm not an expert but I think that you can use plughw support of alsa-lib > > > > > > pcm.record { > > > type plug > > > slave { > > > pcm record_hw > > > } > > > route_policy average > > > rate_converter "linear" > > > } > > > > > > I think that automatically change rate and channel for supporting mono > > > channel > > > too > > > > > > > Thanks for the snippet, but, I'm afraid, it didn't help either. > > > Sorry can you explain a little bit more why it doesn't help you? I certainly gladly would explain this, if only I knew... It just doesn't change anything. Are you using it anywhere? If yes, with which hardware configuration and software (alsa-lib) versions? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-02 14:55 ` Guennadi Liakhovetski @ 2010-02-02 14:59 ` Michael Trimarchi 2010-02-02 15:12 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Michael Trimarchi @ 2010-02-02 14:59 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: alsa-devel Guennadi Liakhovetski wrote: > (re-adding the list) > > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > >> Hi, >> >> Guennadi Liakhovetski wrote: >> >>> On Sat, 30 Jan 2010, Michael Trimarchi wrote: >>> >>> >>> >>>> Guennadi Liakhovetski wrote: >>>> >>>> >>>>> Hi >>>>> >>>>> I know this question belongs rather to alsa-users, and I did ask it >>>>> there, >>>>> but got no solution so far. Maybe someone here can help. >>>>> >>>>> The recently posted SuperH SIU driver only supports stereo playback and >>>>> capture (channels_min = channels_max = 2). Is there a way to tell >>>>> alsa-lib >>>>> to duplicate the mono-channel during playback and to mix recorded >>>>> channels >>>>> (or use one of them), if mono recording is requested? >>>>> >>>>> >>>> I'm not an expert but I think that you can use plughw support of alsa-lib >>>> >>>> pcm.record { >>>> type plug >>>> slave { >>>> pcm record_hw >>>> } >>>> route_policy average >>>> rate_converter "linear" >>>> } >>>> >>>> I think that automatically change rate and channel for supporting mono >>>> channel >>>> too >>>> >>>> >>> Thanks for the snippet, but, I'm afraid, it didn't help either. >>> >>> >> Sorry can you explain a little bit more why it doesn't help you? >> > > I certainly gladly would explain this, if only I knew... It just doesn't > change anything. Are you using it anywhere? If yes, with which hardware > configuration and software (alsa-lib) versions? > alsa-lib 1.0.16 #define BUILD_PCM_PLUGIN_RATE "1" #define BUILD_PCM_PLUGIN_ROUTE "1" Hardware android openmoko gta02. Test it with arecord 1 month ago Android Michael > Thanks > Guennadi > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-02 14:59 ` Michael Trimarchi @ 2010-02-02 15:12 ` Guennadi Liakhovetski 2010-02-02 15:25 ` Michael Trimarchi 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-02 15:12 UTC (permalink / raw) To: Michael Trimarchi; +Cc: alsa-devel On Tue, 2 Feb 2010, Michael Trimarchi wrote: > Guennadi Liakhovetski wrote: > > (re-adding the list) > > > > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > > > > > > Hi, > > > > > > Guennadi Liakhovetski wrote: > > > > > > > On Sat, 30 Jan 2010, Michael Trimarchi wrote: > > > > > > > > > > > > > Guennadi Liakhovetski wrote: > > > > > > > > > > > Hi > > > > > > > > > > > > I know this question belongs rather to alsa-users, and I did ask it > > > > > > there, > > > > > > but got no solution so far. Maybe someone here can help. > > > > > > > > > > > > The recently posted SuperH SIU driver only supports stereo playback > > > > > > and > > > > > > capture (channels_min = channels_max = 2). Is there a way to tell > > > > > > alsa-lib > > > > > > to duplicate the mono-channel during playback and to mix recorded > > > > > > channels > > > > > > (or use one of them), if mono recording is requested? > > > > > > > > > > > I'm not an expert but I think that you can use plughw support of > > > > > alsa-lib > > > > > > > > > > pcm.record { > > > > > type plug > > > > > slave { > > > > > pcm record_hw > > > > > } > > > > > route_policy average > > > > > rate_converter "linear" > > > > > } > > > > > > > > > > I think that automatically change rate and channel for supporting mono > > > > > channel > > > > > too > > > > > > > > > Thanks for the snippet, but, I'm afraid, it didn't help either. > > > > > > > Sorry can you explain a little bit more why it doesn't help you? > > > > > > > I certainly gladly would explain this, if only I knew... It just doesn't > > change anything. Are you using it anywhere? If yes, with which hardware > > configuration and software (alsa-lib) versions? > > > alsa-lib 1.0.16 1.0.22 here. > #define BUILD_PCM_PLUGIN_RATE "1" > #define BUILD_PCM_PLUGIN_ROUTE "1" Yes, have these in include/config.h too. > Hardware android openmoko gta02. Test it with arecord 1 month ago Ok, looks like openmoko has a few configurations, of which some are just mono, and the I2S is, of course, stereo only. So, did this work with the HiFi (I2S) interface and not with bluetooth? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-02 15:12 ` Guennadi Liakhovetski @ 2010-02-02 15:25 ` Michael Trimarchi 2010-02-02 16:38 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Michael Trimarchi @ 2010-02-02 15:25 UTC (permalink / raw) To: Guennadi Liakhovetski; +Cc: alsa-devel Guennadi Liakhovetski wrote: > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > >> Guennadi Liakhovetski wrote: >> >>> (re-adding the list) >>> >>> On Tue, 2 Feb 2010, Michael Trimarchi wrote: >>> >>> >>> >>>> Hi, >>>> >>>> Guennadi Liakhovetski wrote: >>>> >>>> >>>>> On Sat, 30 Jan 2010, Michael Trimarchi wrote: >>>>> >>>>> >>>>> >>>>>> Guennadi Liakhovetski wrote: >>>>>> >>>>>> >>>>>>> Hi >>>>>>> >>>>>>> I know this question belongs rather to alsa-users, and I did ask it >>>>>>> there, >>>>>>> but got no solution so far. Maybe someone here can help. >>>>>>> >>>>>>> The recently posted SuperH SIU driver only supports stereo playback >>>>>>> and >>>>>>> capture (channels_min = channels_max = 2). Is there a way to tell >>>>>>> alsa-lib >>>>>>> to duplicate the mono-channel during playback and to mix recorded >>>>>>> channels >>>>>>> (or use one of them), if mono recording is requested? >>>>>>> >>>>>>> >>>>>> I'm not an expert but I think that you can use plughw support of >>>>>> alsa-lib >>>>>> >>>>>> pcm.record { >>>>>> type plug >>>>>> slave { >>>>>> pcm record_hw >>>>>> } >>>>>> route_policy average >>>>>> rate_converter "linear" >>>>>> } >>>>>> >>>>>> I think that automatically change rate and channel for supporting mono >>>>>> channel >>>>>> too >>>>>> >>>>>> >>>>> Thanks for the snippet, but, I'm afraid, it didn't help either. >>>>> >>>>> >>>> Sorry can you explain a little bit more why it doesn't help you? >>>> >>>> >>> I certainly gladly would explain this, if only I knew... It just doesn't >>> change anything. Are you using it anywhere? If yes, with which hardware >>> configuration and software (alsa-lib) versions? >>> >>> >> alsa-lib 1.0.16 >> > > 1.0.22 here. > > >> #define BUILD_PCM_PLUGIN_RATE "1" >> #define BUILD_PCM_PLUGIN_ROUTE "1" >> > > Yes, have these in include/config.h too. > > >> Hardware android openmoko gta02. Test it with arecord 1 month ago >> > > Ok, looks like openmoko has a few configurations, of which some are just > mono, and the I2S is, of course, stereo only. So, did this work with the > HiFi (I2S) interface and not with bluetooth? > I have tested it on the no-bluetooth interface. What is your testing application and the reporting error? Michael > Thanks > Guennadi > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-02 15:25 ` Michael Trimarchi @ 2010-02-02 16:38 ` Guennadi Liakhovetski 2010-02-03 2:07 ` Raymond Yau 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-02 16:38 UTC (permalink / raw) To: Michael Trimarchi; +Cc: alsa-devel On Tue, 2 Feb 2010, Michael Trimarchi wrote: > I have tested it on the no-bluetooth interface. What is your testing > application and the reporting error? Using aplayer / arecord, I posted a couple of logs in other threads, see, e.g., http://thread.gmane.org/gmane.linux.alsa.user/33861 and a log with some debugging http://pastebin.ca/1773284 Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-02 16:38 ` Guennadi Liakhovetski @ 2010-02-03 2:07 ` Raymond Yau 2010-02-03 22:11 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Raymond Yau @ 2010-02-03 2:07 UTC (permalink / raw) To: alsa-devel 2010/2/3 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > > I have tested it on the no-bluetooth interface. What is your testing > > application and the reporting error? > > Using aplayer / arecord, I posted a couple of logs in other threads, see, > e.g., http://thread.gmane.org/gmane.linux.alsa.user/33861 and a log with > some debugging http://pastebin.ca/1773284 > > Thanks > Guennadi > Try export LIBASOUND_DEBUG=1 arecord -v -Dplughw:0,0 -c 1 -f S16_LE -r 800 -d 30 any.wav ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-03 2:07 ` Raymond Yau @ 2010-02-03 22:11 ` Guennadi Liakhovetski 2010-02-04 0:12 ` Raymond Yau 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-03 22:11 UTC (permalink / raw) To: Raymond Yau; +Cc: alsa-devel On Wed, 3 Feb 2010, Raymond Yau wrote: > 2010/2/3 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > > > > I have tested it on the no-bluetooth interface. What is your testing > > > application and the reporting error? > > > > Using aplayer / arecord, I posted a couple of logs in other threads, see, > > e.g., http://thread.gmane.org/gmane.linux.alsa.user/33861 and a log with > > some debugging http://pastebin.ca/1773284 > > > > Thanks > > Guennadi > > > > Try > > export LIBASOUND_DEBUG=1 > arecord -v -Dplughw:0,0 -c 1 -f S16_LE -r 800 -d 30 any.wav No success either (with 8000Hz instead of 800): Recording WAVE '/tmp/any.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono CHOOSE called: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 8000 PERIOD_TIME: 125000 PERIOD_SIZE: 1000 PERIOD_BYTES: 2000 PERIODS: 4 BUFFER_TIME: 500000 BUFFER_SIZE: 4000 BUFFER_BYTES: 8000 TICK_TIME: ALL choose done ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 8000 PERIOD_TIME: 125000 PERIOD_SIZE: 1000 PERIOD_BYTES: 2000 PERIODS: 4 BUFFER_TIME: 500000 BUFFER_SIZE: 4000 BUFFER_BYTES: 8000 TICK_TIME: 0 arecord: set_params:1053: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 8000 PERIOD_TIME: 125000 PERIOD_SIZE: 1000 PERIOD_BYTES: 2000 PERIODS: 4 BUFFER_TIME: 500000 BUFFER_SIZE: 4000 BUFFER_BYTES: 8000 TICK_TIME: 0 Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-03 22:11 ` Guennadi Liakhovetski @ 2010-02-04 0:12 ` Raymond Yau 2010-02-04 20:24 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Raymond Yau @ 2010-02-04 0:12 UTC (permalink / raw) To: alsa-devel 2010/2/4 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > On Wed, 3 Feb 2010, Raymond Yau wrote: > > > 2010/2/3 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > > > > On Tue, 2 Feb 2010, Michael Trimarchi wrote: > > > > > > > I have tested it on the no-bluetooth interface. What is your testing > > > > application and the reporting error? > > > > > > Using aplayer / arecord, I posted a couple of logs in other threads, > see, > > > e.g., http://thread.gmane.org/gmane.linux.alsa.user/33861 and a log > with > > > some debugging http://pastebin.ca/1773284 > > > > > > Thanks > > > Guennadi > > > > > > > Try > > > > export LIBASOUND_DEBUG=1 > > arecord -v -Dplughw:0,0 -c 1 -f S16_LE -r 800 -d 30 any.wav > > No success either (with 8000Hz instead of 800): > > Recording WAVE '/tmp/any.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, > Mono > CHOOSE called: > ACCESS: RW_INTERLEAVED > FORMAT: S16_LE > SUBFORMAT: STD > SAMPLE_BITS: 16 > FRAME_BITS: 16 > CHANNELS: 1 > RATE: 8000 > PERIOD_TIME: 125000 > PERIOD_SIZE: 1000 > PERIOD_BYTES: 2000 > PERIODS: 4 > BUFFER_TIME: 500000 > BUFFER_SIZE: 4000 > BUFFER_BYTES: 8000 > TICK_TIME: ALL > choose done > ACCESS: RW_INTERLEAVED > FORMAT: S16_LE > SUBFORMAT: STD > SAMPLE_BITS: 16 > FRAME_BITS: 16 > CHANNELS: 1 > RATE: 8000 > PERIOD_TIME: 125000 > PERIOD_SIZE: 1000 > PERIOD_BYTES: 2000 > PERIODS: 4 > BUFFER_TIME: 500000 > BUFFER_SIZE: 4000 > BUFFER_BYTES: 8000 > TICK_TIME: 0 > arecord: set_params:1053: Unable to install hw params: > ACCESS: RW_INTERLEAVED > FORMAT: S16_LE > SUBFORMAT: STD > SAMPLE_BITS: 16 > FRAME_BITS: 16 > CHANNELS: 1 > RATE: 8000 > PERIOD_TIME: 125000 > PERIOD_SIZE: 1000 > PERIOD_BYTES: 2000 > PERIODS: 4 > BUFFER_TIME: 500000 > BUFFER_SIZE: 4000 > BUFFER_BYTES: 8000 > TICK_TIME: 0 > > Thanks > Guennadi > --- > > if LIBASOUND_DEBUG = 1 cannot tell you which parameter fail in hw_params() , you will need to define RULES_DEBUG in alsa-kernel/core/pcm_native.c and compile driver with debug=verbose -#undef RULES_DEBUG +#define RULES DEBUG 1 you can find out how ALSA refine the hw parameters by examing the system log ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-04 0:12 ` Raymond Yau @ 2010-02-04 20:24 ` Guennadi Liakhovetski 2010-02-05 9:44 ` Raymond Yau 0 siblings, 1 reply; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-04 20:24 UTC (permalink / raw) To: Raymond Yau; +Cc: alsa-devel On Thu, 4 Feb 2010, Raymond Yau wrote: I would see your reply sooner, if you used reply-to-all. > if LIBASOUND_DEBUG = 1 cannot tell you which parameter fail in hw_params() , > you will need to define RULES_DEBUG in alsa-kernel/core/pcm_native.c and > compile driver with debug=verbose > > -#undef RULES_DEBUG > +#define RULES DEBUG 1 That's already on too. Not sure what you mean by "compile driver with debug=verbose," supposedly, some kernel ALSA debug parameter. Since this is my driver, I can certainly add any debugging there, but it seems obvious to me, that the kernel is still getting a mono configuration, which shouldn't be the cae. > you can find out how ALSA refine the hw parameters by examing the system log If you mean "dmesg" output, then, as I said, there isn't much to look for there - the kernel is configured for mono... Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-04 20:24 ` Guennadi Liakhovetski @ 2010-02-05 9:44 ` Raymond Yau 2010-02-05 10:14 ` Guennadi Liakhovetski 0 siblings, 1 reply; 14+ messages in thread From: Raymond Yau @ 2010-02-05 9:44 UTC (permalink / raw) To: Guennadi Liakhovetski, alsa-devel 2010/2/5 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > On Thu, 4 Feb 2010, Raymond Yau wrote: > > I would see your reply sooner, if you used reply-to-all. > > > if LIBASOUND_DEBUG = 1 cannot tell you which parameter fail in > hw_params() , > > you will need to define RULES_DEBUG in alsa-kernel/core/pcm_native.c and > > compile driver with debug=verbose > > > > -#undef RULES_DEBUG > > +#define RULES DEBUG 1 > > That's already on too. Not sure what you mean by "compile driver with > debug=verbose," supposedly, some kernel ALSA debug parameter. Since this > is my driver, I can certainly add any debugging there, but it seems > obvious to me, that the kernel is still getting a mono configuration, > which shouldn't be the cae. > > > you can find out how ALSA refine the hw parameters by examing the system > log > > If you mean "dmesg" output, then, as I said, there isn't much to look for > there - the kernel is configured for mono... > > Thanks > Guennadi > your output is quite different from mine arecord -v -f cd -c 1 -d 30 -r 8000 -Dplughw:1,0 any.wav Recording WAVE 'any.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono Plug PCM: Route conversion PCM (sformat=S16_LE) Transformation table: 0 <- 0*0.5 + 1*0.5 Its setup is: stream : CAPTURE access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 1 rate : 8000 exact rate : 8000 (8000/1) msbits : 16 buffer_size : 3968 period_size : 992 period_time : 124000 tstamp_mode : NONE period_step : 1 avail_min : 992 period_event : 0 start_threshold : 1 stop_threshold : 3968 silence_threshold: 0 silence_size : 0 boundary : 2080374784 Slave: Hardware PCM card 1 'HDA Intel' device 0 subdevice 0 Its setup is: stream : CAPTURE access : MMAP_INTERLEAVED format : S16_LE subformat : STD channels : 2 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Q] playing / recording mono on a stereo-only hardware 2010-02-05 9:44 ` Raymond Yau @ 2010-02-05 10:14 ` Guennadi Liakhovetski 0 siblings, 0 replies; 14+ messages in thread From: Guennadi Liakhovetski @ 2010-02-05 10:14 UTC (permalink / raw) To: Raymond Yau; +Cc: alsa-devel On Fri, 5 Feb 2010, Raymond Yau wrote: > 2010/2/5 Guennadi Liakhovetski <g.liakhovetski@gmx.de> > > > On Thu, 4 Feb 2010, Raymond Yau wrote: > > > > I would see your reply sooner, if you used reply-to-all. > > > > > if LIBASOUND_DEBUG = 1 cannot tell you which parameter fail in > > hw_params() , > > > you will need to define RULES_DEBUG in alsa-kernel/core/pcm_native.c and > > > compile driver with debug=verbose > > > > > > -#undef RULES_DEBUG > > > +#define RULES DEBUG 1 > > > > That's already on too. Not sure what you mean by "compile driver with > > debug=verbose," supposedly, some kernel ALSA debug parameter. Since this > > is my driver, I can certainly add any debugging there, but it seems > > obvious to me, that the kernel is still getting a mono configuration, > > which shouldn't be the cae. > > > > > you can find out how ALSA refine the hw parameters by examing the system > > log > > > > If you mean "dmesg" output, then, as I said, there isn't much to look for > > there - the kernel is configured for mono... > > > > Thanks > > Guennadi > > > > > your output is quite different from mine > > arecord -v -f cd -c 1 -d 30 -r 8000 -Dplughw:1,0 any.wav > Recording WAVE 'any.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono > Plug PCM: Route conversion PCM (sformat=S16_LE) > Transformation table: > 0 <- 0*0.5 + 1*0.5 > Its setup is: > stream : CAPTURE > access : RW_INTERLEAVED > format : S16_LE > subformat : STD > channels : 1 > rate : 8000 > exact rate : 8000 (8000/1) > msbits : 16 > buffer_size : 3968 > period_size : 992 > period_time : 124000 > tstamp_mode : NONE > period_step : 1 > avail_min : 992 > period_event : 0 > start_threshold : 1 > stop_threshold : 3968 > silence_threshold: 0 > silence_size : 0 > boundary : 2080374784 > Slave: Hardware PCM card 1 'HDA Intel' device 0 subdevice 0 > Its setup is: > stream : CAPTURE > access : MMAP_INTERLEAVED > format : S16_LE > subformat : STD > channels : 2 Of course, in my case set_params() in aplay.c exit earlier as snd_pcm_hw_params() returns an error - see Unable to install hw params: message in my log. Maybe you could try current alsa-lib and alsa-util versions? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-02-05 10:14 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 9:49 [Q] playing / recording mono on a stereo-only hardware Guennadi Liakhovetski
2010-01-30 16:29 ` Michael Trimarchi
2010-01-30 16:45 ` Guennadi Liakhovetski
[not found] ` <4B683B48.1030707@gandalf.sssup.it>
2010-02-02 14:55 ` Guennadi Liakhovetski
2010-02-02 14:59 ` Michael Trimarchi
2010-02-02 15:12 ` Guennadi Liakhovetski
2010-02-02 15:25 ` Michael Trimarchi
2010-02-02 16:38 ` Guennadi Liakhovetski
2010-02-03 2:07 ` Raymond Yau
2010-02-03 22:11 ` Guennadi Liakhovetski
2010-02-04 0:12 ` Raymond Yau
2010-02-04 20:24 ` Guennadi Liakhovetski
2010-02-05 9:44 ` Raymond Yau
2010-02-05 10:14 ` Guennadi Liakhovetski
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.