Re: playing / recording mono on a stereo-only hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Jan 2010, Giuliano Pochini wrote:

> On Mon, 25 Jan 2010 10:34:41 +0100 (CET)
> Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote:
> 
> > On Mon, 25 Jan 2010, Clemens Ladisch wrote:
> > 
> > > Guennadi Liakhovetski wrote:
> > > > Is there a way to tell alsa-lib to duplicate the mono-channel during
> > > > playback and to mix recorded channels, if mono recording is requested?
> > > 
> > > Yes, with the "plug" plugin.  It should be used automatically by the
> > > "default" and "plughw" devices.
> > 
> > Do I need any asoundrc for this or should this also happen without one? 
> > This "plug" plugin is built into the libasound? I was advised to use 
> > config like
> > 
> > pcm.!default {
> >         type plug
> >         slave {
> >                 pcm "hw:0,0"
> >                 channels 2
> >         }
> >         route_policy duplicate
> > }
> > 
> > but, unfortunately, it didn't help.
> 
> Try something simpler:
> 
> arecord -v -Dplughw:0 -c1 -r44100 -fS16_LE out.wav
> 
> It prints the given parameters and, if the format is not supported by the
> card, it also prints the choosen settings. In that case audio data is
> transparently converted to the format you requested.
> You shouldn't have to specify plughw: because it's the default.

Unfortunately, didn't work:

$ arecord -c1 -r44100 -fS16_LE -v -d 8 /tmp/rec.wav
Recording WAVE '/tmp/rec.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
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: 44100
PERIOD_TIME: (46439 46440)
PERIOD_SIZE: 2048
PERIOD_BYTES: 4096
PERIODS: 11
BUFFER_TIME: (510839 510840)
BUFFER_SIZE: 22528
BUFFER_BYTES: 45056
TICK_TIME: 0

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux