From: Timur Tabi <timur@freescale.com>
To: ALSA development <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: arecord: main:552: audio open error: Invalid argument
Date: Wed, 4 Aug 2010 14:55:45 -0500 [thread overview]
Message-ID: <4C59C5C1.50504@freescale.com> (raw)
Liam and Mark,
I created a log with some printks that kinda show what's going on. In one
process I run speaker-test, and then I start arecord in another process.
fsl_ssi_startup:286 substream=ef3e5000 playback=0 capture=0
fsl_ssi_startup:288 rtd=ef3a2c00 rate=0
fsl_ssi_startup:298
fsl_ssi_startup:373 first=(null) second=(null)
fsl_ssi_startup:427
soc_pcm_open:381
fsl_dma_open:408 rtd=ef3a2c00 rate=0
soc_pcm_open:391
soc_pcm_open:402
soc_pcm_open:412
soc_pcm_open:463
soc_pcm_open:471
soc_pcm_open:477
soc_pcm_open:484
asoc: cs4270-hifi <-> e0016000.ssi info:
asoc: rate mask 0x40001fff
asoc: min ch 2 max ch 2
asoc: min rate 5512 max rate 192000
fsl_ssi_hw_params:450
Rate set to 48000Hz (requested 48000Hz)
fsl_dma_hw_params:579
soc_pcm_hw_params:748 rtd=ef3a2c00 rate=48000
...
fsl_ssi_startup:286 substream=ef3e5300 playback=1 capture=0
fsl_ssi_startup:288 rtd=ef3a2d10 rate=0
fsl_ssi_startup:373 first=ef3e5000 second=(null)
fsl_ssi_startup:411 runtime=ef4ba800 sample_bits=16
fsl_ssi_startup:427
soc_pcm_open:381
fsl_dma_open:408 rtd=ef3a2d10 rate=0 <<------
soc_pcm_open:391
soc_pcm_open:402
soc_pcm_open:412
soc_pcm_open:463
soc_pcm_open:471
soc_pcm_open:477
soc_pcm_open:484
soc_pcm_apply_symmetry:335 rtd=ef3a2d10 rate=0
capture: Symmetry forces 0Hz rate
In summary, the problem appears to be that asoc calls
soc_pcm_apply_symmetry() in soc_pcm_open(), but this occurs before
soc_pcm_hw_params() can set rtd->rate. So rtd->rate is always zero when
soc_pcm_apply_symmetry() is called.
For some reason, this isn't a problem when arecord is started before
speaker-test. In that case, rtd->rate is 48000 when speaker-test is started:
fsl_ssi_startup:286 substream=ef3e5300 playback=0 capture=0
fsl_ssi_startup:288 rtd=ef3e6d10 rate=0
fsl_ssi_startup:298
fsl_ssi_startup:373 first=(null) second=(null)
fsl_ssi_startup:427
soc_pcm_open:382
fsl_dma_open:408 rtd=ef3e6d10 rate=0
soc_pcm_open:392
soc_pcm_open:403
soc_pcm_open:413
soc_pcm_open:464
soc_pcm_open:472
soc_pcm_open:478
soc_pcm_open:485
asoc: cs4270-hifi <-> e0016000.ssi info:
asoc: rate mask 0x40001fff
asoc: min ch 2 max ch 2
asoc: min rate 5512 max rate 192000
fsl_ssi_hw_params:450
fsl_dma_hw_params:579
soc_pcm_hw_params:749 rtd=ef3e6d10 rate=48000
pop wq checking: Playback status: inactive waiting: yes
...
fsl_ssi_startup:286 substream=ef3e5000 playback=0 capture=1
fsl_ssi_startup:288 rtd=ef3e6c00 rate=48000
fsl_ssi_startup:373 first=ef3e5300 second=(null)
fsl_ssi_startup:411 runtime=ef4c6c00 sample_bits=16
fsl_ssi_startup:427
soc_pcm_open:382
fsl_dma_open:408 rtd=ef3e6c00 rate=48000 <<------
soc_pcm_open:392
soc_pcm_open:403
soc_pcm_open:413
soc_pcm_open:464
soc_pcm_open:472
soc_pcm_open:478
soc_pcm_open:485
soc_pcm_apply_symmetry:333 rtd=ef3e6c00 rate=48000
playback: Symmetry forces 48000Hz rate
asoc: cs4270-hifi <-> e0016000.ssi info:
asoc: rate mask 0x40001fff
asoc: min ch 2 max ch 2
asoc: min rate 5512 max rate 192000
fsl_ssi_hw_params:450
Rate set to 48000Hz (requested 48000Hz)
fsl_dma_hw_params:579
Buffer soc_pcm_hw_params:749 rtd=ef3e6c00 rate=48000
next reply other threads:[~2010-08-04 19:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 19:55 Timur Tabi [this message]
2010-08-04 20:01 ` arecord: main:552: audio open error: Invalid argument Mark Brown
2010-08-04 21:15 ` Timur Tabi
2010-08-05 11:10 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C59C5C1.50504@freescale.com \
--to=timur@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.