<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Raspberry Pi and Karaoke Machine (Wolfson Pi Use and its Limitation)</title><link>/challenges-projects/design-challenges/rocking-raspberry-pi/b/blog/posts/raspberry-pi-and-karaoke-machine-wolfson-pi-use-and-its-limitation</link><description>Hello everyone, This week I’ll post to how to use Wolfson Pi and some limitation that I found in the Wolfson Pi while in use. As previously said I used the technique explained by Ragnar Jensen. So I have attached the “use_case_script”...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Raspberry Pi and Karaoke Machine (Wolfson Pi Use and its Limitation)</title><link>https://community.element14.com/challenges-projects/design-challenges/rocking-raspberry-pi/b/blog/posts/raspberry-pi-and-karaoke-machine-wolfson-pi-use-and-its-limitation</link><pubDate>Fri, 18 Apr 2014 21:48:08 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d3026a51-0b7e-4545-a7d8-62e860afce99</guid><dc:creator>e14 Contributor</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Hi!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;
&lt;p&gt;I don’t know why wolfson pi don’t record 8000Hz or 16000Hz sample rate audio format&lt;/p&gt;


&lt;/blockquote&gt;&lt;p&gt;Those limitations crept in by mistake. This post explains:&lt;a class="jive-link-message-small" href="https://www.element14.com/community/message/107271/l/re-pjsippjsua-with-wolfson-audio-card#107271"&gt;Re: PJSIP/PJSUA with Wolfson audio card&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;&lt;ol&gt;
&lt;li&gt;Unable to record 8000Hz/16000Hz sample rate format audio.&lt;/li&gt;
&lt;li&gt;Unable to record 8-Bit audio format.&lt;/li&gt;
&lt;li&gt;Unable to run 2 or more sound application using wolfson pi at the same time. (So definitely when I use it in karaoke either I hear music or I can loop back my voice).&lt;br /&gt; Getting error resource or device busy when using 2 sound instances at same time.&lt;/li&gt;
&lt;/ol&gt;&lt;/blockquote&gt;&lt;p&gt;You could try my .asoundrc.&lt;/p&gt;&lt;p&gt;Save this script as /home/pi/.asoundrc (make a copy of the original first, just to be safe).&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=text&amp;amp;text=%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%23%0A%23+Use+libsamplerate+instead+of+internal+resampler.%0A%23+You+might+have+to%3A+sudo+apt-get+install+libasound2-plugins%0A%23+Or+just+comment+out+the+next+line+if+the+internal+one+is+good+enough+for+your+needs.%0Adefaults.pcm.rate_converter+%22samplerate%22%0A%0A%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%23%0A%23+Wolfson+Audio+Card+for+Raspberry+Pi%0A%23%0Apcm.wolfson_pi_soundcard+%7B%0A++type+hw%0A++card+sndrpiwsp%0A++device+0%0A%7D%0A%23+Create+a+Master+volume+control%0Apcm.softvol+%7B%0A++type+softvol%0A++slave+%7B%0A++pcm+%22pduplex%22%0A++%7D%0A++control+%7B%0A++name+%22Master%22%0A++card+0%0A++%7D%0A%7D%0A%0Apcm.%21default+%7B%0A++type+asym%0A++playback.pcm+%22plug%3Asoftvol%22%0A++capture.pcm+%22pduplex%22%0A%7D%0A%0A%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%0A%23%0A%23+Mixing+and+resampling+goodness+%3A-%29%0A%23%0A%23+Several+clients+can+record+and+play+back+simultaneously.%0A%23+The+dmix+and+dsnoop+plugins+operate+at+48kHz+by+default%2C+i.e.+the+sound+card+will+be+kept+at+48kHz+at+all+times.%0A%23+All+playback+streams+are+converted+to+2+channels%2F48kHz%2F16bit.%0A%23+All+recording+streams+are+converted+from+the+card%27s+2+channels%2F48kHz%2F16bit%0A%23+to+the+requested+number+of+channels%2C+sample+rate+and+bit+depth.%0A%0A%23+We+define+one+pcm+device+called+%22playmixer%22+for+playback.%0Apcm.playmixer+%7B%0A++ipc_key+140324+%23+Any+number+will+do%2C+as+long+as+it%27s+unique+in+the+system.%0A++ipc_key_add_uid+true%0A++type+dmix%0A++slave.pcm+%22wolfson_pi_soundcard%22%0A%7D%0A%0A%23+Define+another+one+called+%22recmixer%22+for+capture.%0A%23+The+sound+card+will+run+at+48kHz+and+input+is+resampled+to+the+requested+rate.%0Apcm.recmixer+%7B%0A++ipc_key+140325%0A++ipc_key_add_uid+true%0A++type+dsnoop%0A++slave.pcm+%22wolfson_pi_soundcard%22%0A%7D%0A%0A%23+Define+a+duplex+device%2C+with+both+in-+and+outputs.%0Apcm.duplex+%7B%0A++type+asym%0A++playback.pcm+%22playmixer%22%0A++capture.pcm+%22recmixer%22%0A%7D%0A%0A%23+Add+a+%22plug%22+plugin+for+the+above+%22duplex%22+device.%0A%23+This+is+where+all+the+converting+takes+place.%0A%23+Sample+rate%2C+number+of+channels%2C+bit+depth.%0A%23+By+the+way%2C+who+thought+that+%22plug%22+was+a+good+name+for+a+plugin%3F%0A%23%0A%23+Use+this+device+for+all+your+playback+and+recording+resampling+needs.%0Apcm.pduplex+%7B%0A++type+plug%0A++slave.pcm+%22duplex%22%0A%7D%0A%0A%23+A+ctl+device+to+keep+xmms+happy%0Actl.pduplex+%7B%0A++type+hw%0A++card+0%0A%7D%0A%0A%23+A+DSP+to+keep+the+alsa-oss+layer+happy%3A%0Apcm.dsp0+%7B%0A++type+plug%0A++slave.pcm+%22duplex%22%0A%7D%0A%0Actl.mixer0+%7B%0A++type+hw%0A++card+0%0A%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You should now be able to record at 8000 and 16000 and in 8 bit in both mono and stereo, using the &amp;quot;default&amp;quot; device.&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;Ragnar&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=17550&amp;AppID=88&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>