<?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 driver sgtl5000.c in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396236#M58084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;A href="https://community.nxp.com/people/dauphinalexandre"&gt;dauphinalexandre&lt;/A&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; For your application, we don't have ready-made source code for you, but I have some suggestions for you as reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; According to Linux ALSA driver architecture, we can read/write some codec registers that you are intrested in through Kcontrol interface, you can find the device at sound card path, but we have to modify sgtl5000 driver , to add some Kcontrols related to those registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; For application level, I suggest you had better refter to amixer source code to check how it loads Kcontrol interfaces, even some source code in it can directly be copied to your application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; see the link :&amp;nbsp; &lt;A href="http://www.alsa-project.org/main/index.php/Main_Page" title="http://www.alsa-project.org/main/index.php/Main_Page"&gt;AlsaProject&lt;/A&gt; , and download : &lt;A class="external text" href="ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.29.tar.bz2" rel="nofollow"&gt;alsa-utils-1.0.29&lt;/A&gt;, you will get amixer source code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; Hope above suggestions can help you !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;Weidong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2015 06:01:49 GMT</pubDate>
    <dc:creator>weidong_sun</dc:creator>
    <dc:date>2015-07-30T06:01:49Z</dc:date>
    <item>
      <title>Audio driver sgtl5000.c</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396235#M58083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently working on a wandbord dl and i'm trying to use the audio codec SGTL5000 for some applications.&lt;/P&gt;&lt;P&gt;I'm looking for a way to modify the SGTL5000 registers from user side and didn't modify the driver sgtl5000.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-size: 12pt;"&gt;Is it possible to have access to the registers by using some structure defined in the driver sgtl5000.c in user or the only way is via i2c control?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with i2c but i have some issues&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can make a dump and read the registers with a dump like it's explained in this&amp;nbsp; topic :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/357604" rel="nofollow noopener noreferrer" target="_blank"&gt;Can you get a dump of the SGTL5000 codec registers?&lt;/A&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;root@freescale /$ cat /sys/kernel/debug/regmap/1-000a/registers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;000: a011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;002: 0060&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;004: 0008&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can find my i2c devices by using the package i2c-tools:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14381847752727666 jive_macro_code jive_text_macro" data-renderedposition="450_8_1180_80" jivemacro_uid="_14381847752727666" modifiedtitle="true"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@debian-armhf:/# i2cdetect -l&lt;/P&gt;&lt;P&gt;i2c-0&amp;nbsp;&amp;nbsp; i2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21a0000.i2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C adapter&lt;/P&gt;&lt;P&gt;i2c-1&amp;nbsp;&amp;nbsp; i2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21a4000.i2c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C adapter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sgtl5000 is present at the address x0a :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14381848855179852 jive_macro_code jive_text_macro" data-renderedposition="593_8_1180_112" jivemacro_uid="_14381848855179852" modifiedtitle="true"&gt;&lt;P&gt;root@debian-armhf:/# i2cdetect -y 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5&amp;nbsp; 6&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9&amp;nbsp; a&amp;nbsp; b&amp;nbsp; c&amp;nbsp; d&amp;nbsp; e&amp;nbsp; f&lt;/P&gt;&lt;P&gt;00:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- -- -- -- -- -- -- UU -- -- -- -- -- &lt;/P&gt;&lt;P&gt;10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;/P&gt;&lt;P&gt;20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;/P&gt;&lt;P&gt;30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &lt;/P&gt;&lt;P&gt;40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i read and tried to set some values i always have zero :&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14381849281001501" data-renderedposition="747_8_1180_112" jivemacro_uid="_14381849281001501" modifiedtitle="true"&gt;&lt;P&gt;root@debian-armhf:/# i2cdump -f -y -r 0-0xff 1 0x0a&lt;/P&gt;&lt;P&gt;No size specified (using byte-data access)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5&amp;nbsp; 6&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9&amp;nbsp; a&amp;nbsp; b&amp;nbsp; c&amp;nbsp; d&amp;nbsp; e&amp;nbsp; f&amp;nbsp;&amp;nbsp;&amp;nbsp; 0123456789abcdef&lt;/P&gt;&lt;P&gt;00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ................&lt;/P&gt;&lt;P&gt;10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ................&lt;/P&gt;&lt;P&gt;20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ................&lt;/P&gt;&lt;P&gt;30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&amp;nbsp;&amp;nbsp;&amp;nbsp; ................&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone know why I do not ais access to these registers by i2c?&lt;/P&gt;&lt;P&gt;and what is the best way to change them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 16:20:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396235#M58083</guid>
      <dc:creator>dauphinalexandr</dc:creator>
      <dc:date>2015-07-29T16:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Audio driver sgtl5000.c</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396236#M58084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;A href="https://community.nxp.com/people/dauphinalexandre"&gt;dauphinalexandre&lt;/A&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; For your application, we don't have ready-made source code for you, but I have some suggestions for you as reference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; According to Linux ALSA driver architecture, we can read/write some codec registers that you are intrested in through Kcontrol interface, you can find the device at sound card path, but we have to modify sgtl5000 driver , to add some Kcontrols related to those registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; For application level, I suggest you had better refter to amixer source code to check how it loads Kcontrol interfaces, even some source code in it can directly be copied to your application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; see the link :&amp;nbsp; &lt;A href="http://www.alsa-project.org/main/index.php/Main_Page" title="http://www.alsa-project.org/main/index.php/Main_Page"&gt;AlsaProject&lt;/A&gt; , and download : &lt;A class="external text" href="ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.29.tar.bz2" rel="nofollow"&gt;alsa-utils-1.0.29&lt;/A&gt;, you will get amixer source code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&amp;nbsp;&amp;nbsp; Hope above suggestions can help you !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;Weidong&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 06:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396236#M58084</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2015-07-30T06:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Audio driver sgtl5000.c</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396237#M58085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to add to this old thread, but I have the same issue. Actually I think modifying the driver to add the DAP MIXER to allow both I2S and Mic/ADC to be fed to the DAC (and set the DAC to DAP) Not 100% sure I can figure that one out on my own. Looked over the control interface (didn't see or grep any Kcontrols? so I could try and reset it myself. As the original post I'm locked out and even if I force I get garbage data back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on this? BTW, using the Fe-Pi board on a Raspberry Pi. (3+, Zero W)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 01:33:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Audio-driver-sgtl5000-c/m-p/396237#M58085</guid>
      <dc:creator>stevenriedl</dc:creator>
      <dc:date>2017-07-27T01:33:51Z</dc:date>
    </item>
  </channel>
</rss>

