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

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

 



On Sat, 30 Jan 2010, Jaroslav Kysela wrote:

> On Sat, 30 Jan 2010, Guennadi Liakhovetski wrote:
> 
> > On Sat, 30 Jan 2010, Giuliano Pochini wrote:
> > 
> > > On Sat, 30 Jan 2010 16:59:48 +0100 (CET)
> > > Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote:
> > > 
> > > > On Sat, 30 Jan 2010, Giuliano Pochini wrote:
> > > > 
> > > > > On Fri, 29 Jan 2010 11:44:43 +0100 (CET)
> > > > > Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote:
> > > > > 
> > > > > > > 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:
> > > > > 
> > > > > Did you try with "-Dplughw:0" ?
> > > > 
> > > > Yes, I did, doesn't help.
> > > 
> > > Does the driver uses rules to set hw params constraints ?  If so, there
> > > may
> > > be an error there. If -for example- rule_format_given_channels() and
> > > rule_channels_given_format() are not perfectly symmetrical then the plughw
> > > plugin does not work.
> > 
> > This is an ASoC driver (sound/soc), here's the code:
> 
> I don't see any issues here. Post 'aplay -v -Dplughw:0' log.

I presume, with a mono wav file. Without any .asoundrs or 
/etc/asound.conf:

aplay -v -Dplughw:0 /home/lyakh/c1.wav
Playing WAVE '/home/lyakh/c1.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
aplay: 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

It shouldn't matter, but alsa is installed under /usr/local/... and I'm 
starting all alsa utilities as

LD_LIBRARY_PATH=/usr/local/lib/ aplay...

and it works with stereo, but not with mono. But just in case that plug-in 
magic does something funny with the environment, there could be a problem 
with that...

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