<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required</link><description>Hi, guys. I&amp;#39;m trying to work with Opus applications using PCA10056 v1.0. In order to play Opus fils using the nRF52840, 
 do I need audio DAC + audio amplifier to create sound on a 3.5mm headphone jack or 1W 8 Ohm speakers? 
 For instance, adding TI&amp;#39;s</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Jun 2019 14:40:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required" /><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/192446?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 14:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e5a58d2-7045-44be-b60f-16ce6b098635</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I would recommend that you check out the &lt;a href="https://opus-codec.org/presentations/"&gt;presentation and slides on the bottom of the Opus page.&lt;/a&gt;&amp;nbsp;It seems that SILK would be the best choice for your application.&lt;/p&gt;
[quote user="MatthewKYEO"]considering the algorithm I choose, do you mean&amp;nbsp;I have to use a different decoding function?[/quote]
&lt;p&gt;No,&amp;nbsp;as mentioned in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33414/opus-decoder/128627#128627"&gt;this thread&lt;/a&gt;:&lt;/p&gt;
[quote userid="21027" url="~/f/nordic-q-a/33414/opus-decoder/128627"]2.&amp;nbsp;The Opus decoder does not need additional information to know which algorithm&amp;nbsp;was used to encode the current frame. In the original Opus code (&lt;a href="https://opus-codec.org/"&gt;https://opus-codec.org/&lt;/a&gt;) there is a function&amp;nbsp;&lt;strong&gt;opus_packet_get_mode()&lt;/strong&gt; which checks if the frame was encoded with CELT or SILK.&amp;nbsp;[/quote]
&lt;p&gt;&lt;/p&gt;
[quote user="MatthewKYEO"]Also, these algorithms create different output; floating point / integer?[/quote]
&lt;p&gt;The algorithms should provide the same output, but the code base can produce both a fixed-point and a floating-point output. This is from their &lt;a href="https://wiki.xiph.org/OpusFAQ#Opus_is_using_too_much_CPU_for_my_application._What_can_I_do.3F"&gt;FAQ&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;&lt;span&gt;If you&amp;#39;re targeting an embedded/mobile platform, chances are the fixed-point build will be faster, so make sure you&amp;#39;re using&amp;nbsp;&lt;/span&gt;&lt;b&gt;--enable-fixed-point&lt;/b&gt;&lt;span&gt;&amp;nbsp;or defining&amp;nbsp;&lt;/span&gt;&lt;b&gt;FIXED_POINT&lt;/b&gt;&lt;span&gt;&amp;nbsp;in the build system.&amp;quot;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/192432?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 14:09:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:681c023e-ba64-4a07-b351-3fdd4dcdc654</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;2 last things before closing this.&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required/192298"]The output from opus is PCM format, either floating point or integer, based on which decode function you use.[/quote]
&lt;p&gt;This sounds like&amp;nbsp;&lt;span&gt;CELT (Constrained Energy Lapped Transform) vs SILK vs hybrid problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Since I&amp;#39;m a beginner, choosing a hybrid method seems tough. Most Opus file I have inside the SD card has a length of 30 seconds max, which is mostly speeches (saying go right, turn left on NY street, etc).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I pick the priority of&amp;nbsp;small size as possible, which algorithm should I choose; CELT / SILK?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-&amp;nbsp;CELT vs SILK vs hybrid;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;considering the algorithm I choose, do you mean&amp;nbsp;I have to use a different decoding function?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, these algorithms create different output; floating point / integer?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/192298?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 09:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1f3e1a1-aeb4-41f0-b6ad-da434438a9fe</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="MatthewKYEO"]does this mean the decoded data has to become a PCM format[/quote]
&lt;p&gt;The output from opus is PCM format, either floating point or integer, based on which decode function you use.&lt;/p&gt;
[quote user="MatthewKYEO"]does this mean I have to configure clock frequencies or other parameters via&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C?&lt;/span&gt;[/quote]
&lt;p&gt;Yes, it seems that many amplifiers need to be configured via I2C.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/191724?ContentTypeID=1</link><pubDate>Sat, 08 Jun 2019 00:08:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68303307-74d2-4695-8a05-43c503f48af0</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Now I&amp;#39;m getting used to Opus a little bit. Thanks,&amp;nbsp;J&amp;oslash;rgen!&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required/191574"]In Smart Remote, the microphone captures data in PCM format, which is coded with Opus before transmitting over BLE. You should be able to do something similar the other way.[/quote]
&lt;p&gt;In my case, what I want to do is&lt;/p&gt;
&lt;p&gt;- nRF52840 reads the SD card via SPI to get the OPUS file (file size will be near 5kBytes.)&lt;/p&gt;
&lt;p&gt;(I want to store multiple OPUS files and I have to consider the file size)&lt;/p&gt;
&lt;p&gt;- nRF52840 decodes this file&lt;/p&gt;
&lt;p&gt;- nRF52840 sends the decoded data via&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;S&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;MAX98357A amp makes the speaker play sounds&lt;/p&gt;
&lt;p&gt;May I double check these before closing;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Q0. As you pointed from the datasheet that&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required/191574"]&amp;quot;&lt;span&gt;The digital audio interface automatically recognizes up to 35 different PCM and TDM clocking schemes which eliminates the need for I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C programming.&amp;quot;&lt;/span&gt;[/quote]
&lt;p&gt;does this mean the decoded data has to become a PCM format, just like the microphone transmitting example,&lt;/p&gt;
&lt;p&gt;before sending this via&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;S&lt;/span&gt;? Maybe if you mention which function&lt;/p&gt;
&lt;p&gt;&lt;a href="http://opus-codec.org/docs/opus_api-1.2/group__opus__decoder.html#ga7d1111f64c36027ddcb81799df9b3fc9"&gt;http://opus-codec.org/docs/opus_api-1.2/group__opus__decoder.html#ga7d1111f64c36027ddcb81799df9b3fc9&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;like&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;opus_decode(), opus_decode_float()&lt;/pre&gt; would be grateful.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Q1. Speaking about PCM(Pulse-code modulation) and TDM(Time-division multiplexing)&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required/191574"]&lt;span&gt;35 different PCM and TDM clocking schemes which eliminates the need for I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C programming.&lt;/span&gt;[/quote]
&lt;p&gt;whereas if I choose a chip like&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ti.com/lit/ds/symlink/tlv320dac3100.pdf"&gt;TLV320DAC3100 Low-Power Stereo Audio DAC With Audio Processing and Mono Class-D Speaker Amplifier&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;does this mean I have to configure clock frequencies or other parameters via&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since this is my first time working with Opus applications, I&amp;#39;m pondering multiple times what to choose.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your help.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/191574?ContentTypeID=1</link><pubDate>Fri, 07 Jun 2019 09:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd4da6db-b9f4-4629-82d6-69e0782aa438</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;A0. Yes, see the answer of the developer in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33414/opus-decoder/128627#128627"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A1. In Smart Remote, the microphone captures data in PCM format, which is coded with Opus before transmitting over BLE. You should be able to do something similar the other way.&lt;/p&gt;
&lt;p&gt;A2. The Amplifier you mention seems to support this nicely: &amp;quot;&lt;span&gt;The digital audio interface automatically recognizes up to 35 different PCM and TDM clocking schemes which eliminates the need for I&lt;/span&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;span&gt;C programming.&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/191466?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 20:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a568b504-dbaa-4727-923d-1623af49d135</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Thanks,&amp;nbsp;J&amp;oslash;rgen&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/48219/for-opus-applications-is-an-audio-dac-chip-required/191312"]but you can also use any other device that has I2S/PDM input and feed it with a decoded audio signal.[/quote]
&lt;p&gt;- Q0. You mean, just like the Smart Remote 3 example, the nRF52840 can decode the audio signal?&lt;/p&gt;
&lt;p&gt;- Q1. If the nRF52840 decodes the Opus audio signal, what type of output does it make (WAV, I2C related output/format)?&lt;/p&gt;
&lt;p&gt;- Q2. Then simply adding an audio amplifier is needed for the hardware requirements? Like this MAX98357A?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.adafruit.com/product/3006"&gt;https://www.adafruit.com/product/3006&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://www.maximintegrated.com/en/images/qv/8218.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For Opus applications, is an Audio DAC chip required?</title><link>https://devzone.nordicsemi.com/thread/191312?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 11:02:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:336b8719-17d5-4222-810a-044c1787dc0c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Opus is an audio CODEC, it is not related to the conversion of digital to analog signals. There might exist dedicated codec chips that include DACs as well, but you can also use any other device that has I2S/PDM input and feed it with a decoded audio signal. It is also possible to &lt;a href="https://infocenter.nordicsemi.com/topic/ug_thingy52/UG/thingy52/hw_description/hw_amp_speaker.html?cp=10_0_6_7_1"&gt;output audio using PWM&lt;/a&gt;, but the quality of this is typically not very good.&lt;/p&gt;
&lt;p&gt;We have a software implementation of Opus compression in our &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sr3nrf52.firmware/audio.html?cp=10_3_1_2_1_0#audio_functionality"&gt;Smart Remote 3 reference design&lt;/a&gt;, but this does not use decompression. Note that compressing/decompressing audio in real-time in software can be very CPU demanding, especially with higher bitrates.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>