<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RT1020 UAC2 example Sample Rate issue in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1758637#M215846</link>
    <description>&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;I’m already taking a look into this. Please give me some time to get deeper in this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Regard,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Daniel.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 22:31:53 GMT</pubDate>
    <dc:creator>DanielRuvalcaba</dc:creator>
    <dc:date>2023-11-16T22:31:53Z</dc:date>
    <item>
      <title>RT1020 UAC2 example Sample Rate issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1757609#M215759</link>
      <description>&lt;P&gt;I am starting with Usb audio UAC2 on a RT1021 dev. board with "evkmimxrt1020_dev_composite_hid_audio_unified_freertos" example.&lt;/P&gt;&lt;P&gt;I managed to change the bit resolution to 24 bit or 32 bit instead of 16 bit default and I modified in "usb_device_descriptor.h" line to&amp;nbsp;#define AUDIO_IN_SAMPLING_RATE_KHZ (96) to have 96000Hz sample rate but when I run the example my Linux still detects the dev board as a 48Khz sample rate one.&lt;/P&gt;&lt;P&gt;This happens only when I compile with #define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U) in "usb-device_config.h" header, instead, if I use&amp;nbsp;#define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (0U) it shows correct 96000Hz sample rate.&lt;/P&gt;&lt;P&gt;There is a way to correct this when&amp;nbsp;#define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U)&amp;nbsp; changing any usb descriptor field when the board is an UAC2 device?&lt;/P&gt;&lt;P&gt;Using alsacap in Linux:&lt;/P&gt;&lt;P&gt;With&amp;nbsp;#define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (1U):&lt;/P&gt;&lt;P&gt;Card 3, ID `DEMO', name `USB AUDIO+HID DEMO'&lt;BR /&gt;Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)&lt;BR /&gt;2 channels, sampling rate 48000..48000 Hz&lt;BR /&gt;Sample formats: S24_3LE&lt;BR /&gt;Subdevice 0, name `subdevice #0'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With&amp;nbsp;#define USB_DEVICE_CONFIG_AUDIO_CLASS_2_0 (0U):&lt;/P&gt;&lt;P&gt;Card 3, ID `DEMO', name `USB AUDIO+HID DEMO'&lt;BR /&gt;Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)&lt;BR /&gt;2 channels, sampling rate 96000..96000 Hz&lt;BR /&gt;Sample formats: S24_3LE&lt;BR /&gt;Subdevice 0, name `subdevice #0'&lt;/P&gt;&lt;P&gt;Jose.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 11:56:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1757609#M215759</guid>
      <dc:creator>Escalator2023</dc:creator>
      <dc:date>2023-11-15T11:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: RT1020 UAC2 example Sample Rate issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1758637#M215846</link>
      <description>&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;I’m already taking a look into this. Please give me some time to get deeper in this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Regard,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in 27.5pt 0in 0in;"&gt;&lt;SPAN&gt;Daniel.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 22:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1758637#M215846</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2023-11-16T22:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: RT1020 UAC2 example Sample Rate issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1761024#M216117</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/225761"&gt;@Escalator2023&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to change the frequency with UAC2.0 you will need to modify these values as well in USB_DeviceAudioCompositeInit(). I just tried it and it is working on my side.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielRuvalcaba_0-1700592782047.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250942i5F6C44F519945787/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielRuvalcaba_0-1700592782047.png" alt="DanielRuvalcaba_0-1700592782047.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try it and tell me if it works for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 18:53:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1761024#M216117</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2023-11-21T18:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: RT1020 UAC2 example Sample Rate issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1761213#M216123</link>
      <description>&lt;P&gt;Yes, sample rate change works, thanks Daniel.&lt;/P&gt;&lt;P&gt;I only confirmed it with 16 bit stereo and different sample rates because with more bit resolution (like 24 or 32 bit) Linux cannot give me back the correct format when I plug it&amp;nbsp; so I will check in a Windows computer to see if I need to change anything more for higher resolution work.&lt;/P&gt;&lt;P&gt;My target is 24/32 bit stereo at 96Khz. I modified these lines:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;/* Audio data format */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_OUT_FORMAT_CHANNELS&lt;/SPAN&gt;&lt;SPAN&gt; (0x02U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_OUT_FORMAT_BITS&lt;/SPAN&gt;&lt;SPAN&gt; (24)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_OUT_FORMAT_SIZE&lt;/SPAN&gt;&lt;SPAN&gt; (0x03)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_IN_FORMAT_CHANNELS&lt;/SPAN&gt;&lt;SPAN&gt; (0x02U)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_IN_FORMAT_BITS&lt;/SPAN&gt;&lt;SPAN&gt; (24)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;AUDIO_IN_FORMAT_SIZE&lt;/SPAN&gt;&lt;SPAN&gt; (0x03)&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:27:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1020-UAC2-example-Sample-Rate-issue/m-p/1761213#M216123</guid>
      <dc:creator>Escalator2023</dc:creator>
      <dc:date>2023-11-21T21:27:05Z</dc:date>
    </item>
  </channel>
</rss>

