<div dir="ltr">Thanks for reply.<br><br>System Information is:<br><br>OS: Ubuntu 8.10<br>Kernel: 2.6.27-7-generic #1 SMP<br>libasound2: 1.0.17a (1.0.17a-0ubuntu4)<br>libasound2-plugins: 1.0.17 (1.0.17-0ubuntu4)<br>pulseaudio: 0.9.10 (0.9.10-2ubuntu8)<br>
<br>installed pulseaudio packages:<br>> $ dpkg --get-selections | grep pulseaudio<br>> gstreamer0.10-pulseaudio install<br>> pulseaudio install<br>> pulseaudio-esound-compat install<br>
> pulseaudio-module-gconf install<br>> pulseaudio-module-hal install<br>> pulseaudio-module-x11 install<br>> pulseaudio-module-zeroconf install<br>> pulseaudio-utils install<br>
<br>pulseaudio setting from PerfectSetup<br>> $ cat .pulse/<a href="http://default.pa">default.pa</a><br>> load-module module-esound-protocol-tcp auth-ip-acl=<a href="http://127.0.0.1">127.0.0.1</a>;<a href="http://192.168.0.0/16">192.168.0.0/16</a><br>
> load-module module-native-protocol-tcp auth-ip-acl=<a href="http://127.0.0.1">127.0.0.1</a>;<a href="http://192.168.0.0/16">192.168.0.0/16</a><br>> load-module module-zeroconf-publish<br>> <br>> load-module module-alsa-sink device=hw:0<br>
> load-module module-alsa-source device=hw:0<br><br>alsa setting from PerfectSetup<br>> $ cat ~/.asoundrc<br>> pcm.pulse {<br>> type pulse<br>> }<br>> <br>> ctl.pulse {<br>> type pulse<br>> }<br>
> <br>> pcm.!default {<br>> type pulse<br>> }<br>> <br>> ctl.!default {<br>> type pulse<br>> }<br><br>Error Msg of arecord program:<br>> $ arecord -d 10 -f cd -t wav foobar.wav<br>> Recording WAVE 'foobar.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo<br>
> arecord: pcm_read:1473: read error: Input/output error<br>> $<br><br>arecord(aplay.c) program dies at pcm_read() which is in aplay.c:<br><br>> pcm_read()<br>> -> readi_func()<br>> -> snd_pcm_readi()<br>
<br>and snd_pcm_readi() function returns -EIO(-5)<br><br>In aplay.c:<br><br>> /*<br>> * read function<br>> */<br>> <br>> static ssize_t pcm_read(u_char *data, size_t rcount)<br>> {<br>> ...<br>
> while (count > 0) {<br>> r = readi_func(handle, data, count);<br>> fprintf(stderr, "pcm->setup: %d\n", handle->setup);<br>> if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {<br>
> snd_pcm_wait(handle, 1000);<br>> } else if (r == -EPIPE) {<br>> xrun();<br>> } else if (r == -ESTRPIPE) {<br>> suspend();<br>> } else if (r < 0) {<br>
> error(_("read error: %s"), snd_strerror(r));<br>> exit(EXIT_FAILURE);<br>> }<br>> if (r > 0) {<br>> ...<br><br>In snd_pcm_readi() function (src/pcm/pcm.c of alsa-lib),<br>
it seems CHECK_SANITY(! pcm->setup) condition makes IO error<br><br>In src/pcm/pcm.c:<br><br>> snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size)<br>> {<br>> assert(pcm);<br>
> assert(size == 0 || buffer);<br>> if (CHECK_SANITY(! pcm->setup)) {<br>> SNDMSG("PCM not set up");<br>> return -EIO;<br>> }<br>> if (pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED) {<br>
> SNDMSG("invalid access type %s", snd_pcm_access_name(pcm->access));<br>> return -EINVAL;<br>> }<br>> return _snd_pcm_readi(pcm, buffer, size);<br>> }<br><br>And there was only one place where sets pcm->setup is<br>
_snd_pcm_hw_params() in src/pcm/pcm_params.c.<br><br>Thanks for any advice,<br clear="all"><br>-- <br>Best Regards,<br><br>Keedi Kim<br><br><br><div class="gmail_quote">2008/10/17 Luke Yelavich <span dir="ltr"><<a href="mailto:themuso@ubuntu.com">themuso@ubuntu.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, Oct 17, 2008 at 02:10:22PM EST, Keedi Kim wrote:<br>
> Hi.<br>
><br>
> I followed PerfectSetup of pulseaudio wiki,<br>
> then aplay works well, but arecord doesn't.<br>
> ALSA's arecord terminates with<br>
> "pcm_read:1473: read error: Input/output error" message.<br>
><br>
> Does anybody has idea?<br>
<br>
</div>Could you please tell us what version of alsa-lib/libasound2, alsa-plugins/libasound2-plugins and pulseaudio you are running? Having a better idea what software versions you have will better help us work out the problem.<br>
<font color="#888888"><br>
Luke<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkj4BVEACgkQjVefwtBjIM4g1QCg3UjPGhHeYbjvMWXF0OR9rgXS<br>
rvQAoO30vGWi9gsrR83YJ11R71IPVl+t<br>
=ucms<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
<br></blockquote></div><br>
</div>