<?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: Audio Input issue with SGTL5000 audio codec in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869396#M223984</link>
    <description>&lt;P&gt;Any suggestions??&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 06:15:26 GMT</pubDate>
    <dc:creator>AnjaliA</dc:creator>
    <dc:date>2024-05-21T06:15:26Z</dc:date>
    <item>
      <title>Audio Input issue with SGTL5000 audio codec</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1867789#M223859</link>
      <description>&lt;P&gt;I am facing issue in recording audio via Mic IN. SGTL5000 is interfaced to imx8mnano.&lt;/P&gt;&lt;P&gt;I am using arecord to record the audio. Sample sample output I get:&lt;/P&gt;&lt;P&gt;root@imx8mn-lpddr4-evk:~# arecord -D hw:1,0 -r 48000 -f S16_LE -c 2 -d 10 /record.wav -vvv&lt;BR /&gt;Hardware PCM card 1 'sgtl5000-audio' device 0 subdevice 0&lt;BR /&gt;Its setup is:&lt;BR /&gt;stream : CAPTURE&lt;BR /&gt;access : RW_INTERLEAVED&lt;BR /&gt;format : S16_LE&lt;BR /&gt;subformat : STD&lt;BR /&gt;channels : 2&lt;BR /&gt;rate : 48000&lt;BR /&gt;exact rate : 48000 (48000/1)&lt;BR /&gt;msbits : 16&lt;BR /&gt;buffer_size : 24000&lt;BR /&gt;period_size : 6000&lt;BR /&gt;period_time : 125000&lt;BR /&gt;tstamp_mode : NONE&lt;BR /&gt;tstamp_type : MONOTONIC&lt;BR /&gt;period_step : 1&lt;BR /&gt;avail_min : 6000&lt;BR /&gt;period_event : 0&lt;BR /&gt;start_threshold : 1&lt;BR /&gt;stop_threshold : 24000&lt;BR /&gt;silence_threshold: 0&lt;BR /&gt;silence_size : 0&lt;BR /&gt;boundary : 6755399441055744000&lt;BR /&gt;appl_ptr : 0&lt;BR /&gt;hw_ptr : 0&lt;BR /&gt;Recording WAVE '/record.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;BR /&gt;Max peak (12000 samples): 0x00007fff #################### 99%&lt;/P&gt;&lt;P&gt;But the recording just has noise, no proper audio. Audio output to HPOUT jack is working fine.&lt;/P&gt;&lt;P&gt;Please suggest ways to check if the configuration is correct.&lt;/P&gt;&lt;P&gt;Below is the DTS changes done.&lt;/P&gt;&lt;P&gt;sound-sgtl5000{&lt;BR /&gt;compatible = "fsl,imx-audio-sgtl5000";&lt;BR /&gt;model = "sgtl5000-audio";&lt;BR /&gt;audio-cpu = &amp;lt;&amp;amp;sai3&amp;gt;;&lt;BR /&gt;audio-asrc=&amp;lt;&amp;amp;easrc&amp;gt;;&lt;BR /&gt;audio-codec = &amp;lt;&amp;amp;sgtl5000&amp;gt;;&lt;BR /&gt;audio-routing =&lt;BR /&gt;"MIC_IN", "Mic Jack",&lt;BR /&gt;"Mic Jack", "Mic Bias",&lt;BR /&gt;"Headphone Jack", "HP_OUT",&lt;BR /&gt;"Line Out Jack", "LINE_OUT";&lt;BR /&gt;mux-int-port = &amp;lt;2&amp;gt;;&lt;BR /&gt;mux-ext-port = &amp;lt;3&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;sgtl5000: codec@a {&lt;BR /&gt;compatible = "fsl,sgtl5000";&lt;BR /&gt;reg = &amp;lt;0xa&amp;gt;;&lt;BR /&gt;#sound-dai-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;clocks = &amp;lt;&amp;amp;clk IMX8MN_CLK_SAI3_ROOT&amp;gt;;&lt;BR /&gt;micbias-resistor-k-ohms = &amp;lt;2&amp;gt;;&lt;BR /&gt;micbias-voltage-m-volts = &amp;lt;2250&amp;gt;;&lt;BR /&gt;VDDA-supply = &amp;lt;&amp;amp;reg_module_3v3&amp;gt;;&lt;BR /&gt;VDDIO-supply = &amp;lt;&amp;amp;reg_module_3v3&amp;gt;;&lt;BR /&gt;VDDD-supply = &amp;lt;&amp;amp;reg_module_1v8&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hoping to get a quick reply.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 07:32:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1867789#M223859</guid>
      <dc:creator>AnjaliA</dc:creator>
      <dc:date>2024-05-17T07:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Audio Input issue with SGTL5000 audio codec</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869396#M223984</link>
      <description>&lt;P&gt;Any suggestions??&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 06:15:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869396#M223984</guid>
      <dc:creator>AnjaliA</dc:creator>
      <dc:date>2024-05-21T06:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Audio Input issue with SGTL5000 audio codec</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869473#M223992</link>
      <description>&lt;P&gt;Could you tell me which version of BSP are you using?&lt;/P&gt;
&lt;P&gt;Could you show me your board's device tree file?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 07:46:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869473#M223992</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2024-05-21T07:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Audio Input issue with SGTL5000 audio codec</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869557#M224003</link>
      <description>&lt;DIV&gt;Hi Jimmychan,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are using Yocto BSP 6.6-nanbield.&lt;/DIV&gt;&lt;DIV&gt;The DTS file changes done to enable I2c is:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;sgtl5000: codec@a {&lt;BR /&gt;compatible = "fsl,sgtl5000";&lt;BR /&gt;reg = &amp;lt;0xa&amp;gt;;&lt;BR /&gt;&lt;/SPAN&gt;#sound-dai-cells = &amp;lt;0&amp;gt;;&lt;SPAN class=""&gt;&lt;BR /&gt;clocks = &amp;lt;&amp;amp;clk IMX8MN_CLK_SAI3_ROOT&amp;gt;;&lt;BR /&gt;micbias-resistor-k-ohms = &amp;lt;2&amp;gt;;&lt;BR /&gt;micbias-voltage-m-volts = &amp;lt;2250&amp;gt;;&lt;BR /&gt;VDDA-supply = &amp;lt;&amp;amp;reg_module_3v3&amp;gt;;&lt;BR /&gt;VDDIO-supply = &amp;lt;&amp;amp;reg_module_3v3&amp;gt;;&lt;BR /&gt;VDDD-supply = &amp;lt;&amp;amp;reg_module_1v8&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The DTS file change to enable i2s interface is as below:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;sound-sgtl5000{&lt;BR /&gt;compatible = "fsl,imx-audio-sgtl5000";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; model = "sgtl5000-audio";&lt;BR /&gt;audio-cpu = &amp;lt;&amp;amp;sai3&amp;gt;;&lt;BR /&gt;&lt;/SPAN&gt;audio-asrc = &amp;lt;&amp;amp;easrc&amp;gt;;&lt;SPAN class=""&gt;&lt;BR /&gt;audio-codec = &amp;lt;&amp;amp;sgtl5000&amp;gt;;&lt;BR /&gt;audio-routing =&lt;BR /&gt;"MIC_IN", "Mic Jack",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Mic Jack", "Mic Bias",&lt;BR /&gt;"Headphone Jack", "HP_OUT",&lt;BR /&gt;"Line Out Jack", "LINE_OUT";&lt;BR /&gt;mux-int-port = &amp;lt;2&amp;gt;;&lt;BR /&gt;mux-ext-port = &amp;lt;3&amp;gt;;&lt;BR /&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;With these changes I am able to get the sound card loaded and able to play audio via SGTL5000 HPOUT. But audio recording does not work. The .wav file gets created. But there is complete noise.&lt;/DIV&gt;&lt;DIV&gt;Am new to audio codec interfacing, any suggestions to debug this issue will be valuable.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;AnjaliA&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 09:01:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1869557#M224003</guid>
      <dc:creator>AnjaliA</dc:creator>
      <dc:date>2024-05-21T09:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Audio Input issue with SGTL5000 audio codec</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1870160#M224031</link>
      <description>&lt;P&gt;For your reference, this dts file use the sgtl5000 codec.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts" target="_blank"&gt;https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 03:15:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-Input-issue-with-SGTL5000-audio-codec/m-p/1870160#M224031</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2024-05-22T03:15:24Z</dc:date>
    </item>
  </channel>
</rss>

