<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
On 08/15/2009 11:06 PM, ruchi sirauthiya wrote:
<blockquote
 cite="mid:3a2444df0908150606p7a1cb237qad6d31dedae3ec4a@mail.gmail.com"
 type="cite">
  <div>Hi,</div>
  <div><br>
  </div>
  <div>I am trying to enable a software mixer (using ALSA and dmix) on
an OMAP3 based embedded target board using the twl4030 codec.</div>
  <div><br>
  </div>
  <div>When I try to play audio using the command,</div>
  <div><br>
  </div>
  <div># aplay -D playback rec.wav</div>
  <div><br>
  </div>
  <div>I am getting the following error:</div>
  <div><br>
  </div>
  <div>ALSA lib pcm_direct.c:1098:(snd_pcm_direct_initialize_poll_fd)
unable to</div>
  <div>open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'</div>
  <div>ALSA lib pcm_dmix.c:943:(snd_pcm_dmix_open) unable to initialize
poll_fd</div>
  <div>aplay: main:546: audio open error: No such file or directory</div>
  <div><br>
  </div>
</blockquote>
<br>
According to this thread the drivers can't open a second timer on your
device.<br>
<br>
<a class="moz-txt-link-freetext" href="http://osdir.com/ml/linux.distributions.crux.general/2005-11/msg00134.html">http://osdir.com/ml/linux.distributions.crux.general/2005-11/msg00134.html</a><br>
<br>
<br>
Probably best to contact alsa-dev directly on this one.<br>
<br>
<br>
Warmest regards.<br>
<br>
<pre class="moz-signature" cols="72">Patrick Shirkey
Boost Hardware Ltd</pre>
<br>
<br>
<br>
<br>
<br>
<blockquote
 cite="mid:3a2444df0908150606p7a1cb237qad6d31dedae3ec4a@mail.gmail.com"
 type="cite">
  <div>The contents of my /etc/asound.conf is given below.</div>
  <div><br>
  </div>
  <div>pcm.playback {</div>
  <div>&nbsp;&nbsp; type dmix</div>
  <div>&nbsp;&nbsp; ipc_key 2048</div>
  <div>&nbsp;&nbsp; ipc_key_add_uid true</div>
  <div>&nbsp;&nbsp; ipc_gid 1</div>
  <div>&nbsp;&nbsp; slave {</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp;rate 44100</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp;pcm hw:0</div>
  <div>&nbsp;&nbsp; }</div>
  <div>}</div>
  <div><br>
  </div>
  <div>I have tested it on two kernel versions, 2.6.22 and 2.6.29, but
it fails on both.</div>
  <div>Playback and recording works fine if -D option is not provided.</div>
  <div><br>
  </div>
  <div>I also tried configuring ALSA (dmix) with a different
configuration file which is given in the following link:</div>
  <div><a moz-do-not-send="true"
 href="http://amarok.kde.org/wiki/Setting_up_Dmix_for_ALSA">http://amarok.kde.org/wiki/Setting_up_Dmix_for_ALSA</a></div>
  <div><br>
  </div>
  <div># aplay -D plug:ossmix /mnt/Audio1_1.wav</div>
  <div>ALSA lib pcm_direct.c:1098:(snd_pcm_direct_initialize_poll_fd)
unable to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'</div>
  <div>ALSA lib pcm_dmix.c:943:(snd_pcm_dmix_open) unable to initialize
poll_fd</div>
  <div>aplay: main:546: audio open error: No such file or directory</div>
  <div><br>
  </div>
  <div>But as you can see the same error turns up again.</div>
  <div><br>
  </div>
  <div>What could be the cause of this error?</div>
  <div><br>
  </div>
  <div>Is the above error related to ALSA configuration (for dmix)?</div>
  <div>Do I need to patch the kernel or ALSA for using dmix?</div>
  <div><br>
  </div>
  <div>Please help me resolve this issue. Let me know if any more setup
info is required.</div>
  <div><br>
  </div>
  <div>Thanks and Regards,</div>
  <div><br>
  </div>
  <div>Ruchi Sirauthiya.</div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div>Some information I obtained from the proc filesystem is given
below for your reference.</div>
  <div><br>
  </div>
  <div>-----------------------</div>
  <div>For Linux kernel 2.6.29</div>
  <div>-----------------------</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/version</div>
  <div>Advanced Linux Sound Architecture Driver Version 1.0.19</div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <div>[root@OMAP3 tests]# cat /proc/asound/cards</div>
  <div>&nbsp;0 [omap3evm &nbsp; &nbsp; &nbsp; ]: twl4030 - omap3evm</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;omap3evm (twl4030)</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# omap-dss: Could not find exact pixel clock.
Requested 25188 kHz, got 25187 kHz</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/devices</div>
  <div>&nbsp;&nbsp;2: &nbsp; &nbsp; &nbsp; &nbsp;: timer</div>
  <div>&nbsp;&nbsp;3: [ 0- 0]: digital audio playback</div>
  <div>&nbsp;&nbsp;4: [ 0- 0]: digital audio capture</div>
  <div>&nbsp;&nbsp;5: [ 0] &nbsp; : control</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/timers</div>
  <div>G0: system timer : 7812.500us (10000000 ticks)</div>
  <div>P0-0-0: PCM playback 0-0-0 : SLAVE</div>
  <div>P0-0-1: PCM capture 0-0-1 : SLAVE</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/pcm</div>
  <div>00-00: TWL4030 twl4030-0 : &nbsp;: playback 1 : capture 1</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/devices</div>
  <div>&nbsp;&nbsp;2: &nbsp; &nbsp; &nbsp; &nbsp;: timer</div>
  <div>
&nbsp;&nbsp;3: [ 0- 0]: digital audio playback</div>
  <div>&nbsp;&nbsp;4: [ 0- 0]: digital audio capture</div>
  <div>&nbsp;&nbsp;5: [ 0] &nbsp; : control</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/pcm</div>
  <div>00-00: TWL4030 twl4030-0 : &nbsp;: playback 1 : capture 1</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/oss/devices</div>
  <div>&nbsp;&nbsp;3: [0- 0]: digital audio</div>
  <div>&nbsp;&nbsp;4: [0- 0]: digital audio</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/oss/sndstat</div>
  <div>Sound Driver:3.8.1a-980706 (ALSA v1.0.19 emulation code)</div>
  <div>Kernel: Linux OMAP3 2.6.29-rc3-omap1 #1 Fri Jul 24 14:45:37 IST
2009 armv7l</div>
  <div>Config options: 0</div>
  <div>Installed drivers:</div>
  <div>Type 10: ALSA emulation</div>
  <div><br>
  </div>
  <div>Card config:</div>
  <div>omap3evm (twl4030)</div>
  <div><br>
  </div>
  <div>Audio devices:</div>
  <div>0: &nbsp;(DUPLEX)</div>
  <div><br>
  </div>
  <div>Synth devices: NOT ENABLED IN CONFIG</div>
  <div><br>
  </div>
  <div>Midi devices: NOT ENABLED IN CONFIG</div>
  <div><br>
  </div>
  <div>Timers:</div>
  <div>31: system timer</div>
  <div><br>
  </div>
  <div>Mixers: NOT ENABLED IN CONFIG</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# aplay -D playback /mnt/Audio1_1.wav</div>
  <div>ALSA lib pcm_direct.c:1098:(snd_pcm_direct_initialize_poll_fd)
unable to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'</div>
  <div>ALSA lib pcm_dmix.c:943:(snd_pcm_dmix_open) unable to initialize
poll_fd</div>
  <div>aplay: main:546: audio open error: No such file or directory</div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div>-----------------------</div>
  <div>For Linux kernel 2.6.22</div>
  <div>-----------------------</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/devices</div>
  <div>&nbsp;&nbsp;2: &nbsp; &nbsp; &nbsp; &nbsp;: timer</div>
  <div>&nbsp;&nbsp;3: [ 0- 0]: digital audio playback</div>
  <div>&nbsp;&nbsp;4: [ 0- 0]: digital audio capture</div>
  <div>&nbsp;&nbsp;5: [ 0] &nbsp; : control</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/pcm</div>
  <div>00-00: OMAP PCM : omap alsa pcm : playback 1 : capture 1</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/timers</div>
  <div>G0: system timer : 7812.500us (10000000 ticks)</div>
  <div>P0-0-0: PCM playback 0-0-0 : SLAVE</div>
  <div>P0-0-1: PCM capture 0-0-1 : SLAVE</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/</div>
  <div>/proc/asound/TWL4030/ &nbsp;/proc/asound/devices &nbsp; /proc/asound/timers</div>
  <div>/proc/asound/card0/ &nbsp; &nbsp;/proc/asound/hwdep &nbsp; &nbsp;
/proc/asound/version</div>
  <div>/proc/asound/cards &nbsp; &nbsp; /proc/asound/pcm</div>
  <div><br>
  </div>
  <div>[root@OMAP3 tests]# cat /proc/asound/cards</div>
  <div>&nbsp;0 [TWL4030 &nbsp; &nbsp; &nbsp; &nbsp;]: OMAP_ALSA - TWL4030</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TWL4030</div>
  <div>&nbsp;</div>
  <div>/proc/asound/oss was not found in the proc file system when
booted with kernel 2.6.22.</div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Linux-audio-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linux-audio-user@lists.linuxaudio.org">Linux-audio-user@lists.linuxaudio.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user">http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user</a>
  </pre>
</blockquote>
</body>
</html>