<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_Config_I2S</id>
		<title>How to Config I2S - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://ess-wiki.advantech.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_Config_I2S"/>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;action=history"/>
		<updated>2026-04-07T06:04:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.3</generator>

	<entry>
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19472&amp;oldid=prev</id>
		<title>Jinmin.xu: add 5780 i2s</title>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19472&amp;oldid=prev"/>
				<updated>2020-09-30T07:08:22Z</updated>
		
		<summary type="html">&lt;p&gt;add 5780 i2s&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:08, 30 September 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot; &gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If two i2S codec board are both inserted, then the second i2s CARD generated automatically by kernel is 1.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If two i2S codec board are both inserted, then the second i2s CARD generated automatically by kernel is 1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If only the second I2S1 interface&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/del&gt;i2s_CN4&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/del&gt;is plugged then the&amp;amp;nbsp;i2s CARD is 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If only the second I2S1 interface i2s_CN4 is plugged&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;then the&amp;amp;nbsp;i2s CARD is 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$Card under the following command please use the number 0 or 1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$Card under the following command please use the number 0 or 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jinmin.xu</name></author>	</entry>

	<entry>
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19471&amp;oldid=prev</id>
		<title>Jinmin.xu at 07:06, 30 September 2020</title>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19471&amp;oldid=prev"/>
				<updated>2020-09-30T07:06:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:06, 30 September 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot; &gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following configuration is only for&amp;amp;nbsp;ROM-5780&amp;amp;nbsp;with&amp;amp;nbsp;the&amp;amp;nbsp;carrier board ROM-DB5901.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following configuration is only for&amp;amp;nbsp;ROM-5780&amp;amp;nbsp;with&amp;amp;nbsp;the&amp;amp;nbsp;carrier board ROM-DB5901.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Use the CODEC of the i2s0 for recording and playback. ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Use the CODEC of the i2s0&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;amp;nbsp;&lt;/ins&gt;for recording and playback. ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The CODEC board is pluged&amp;amp;nbsp;into the I2S_cn3. I2s0 is turned on by default, so the CODEC can be turned on directly using the command.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The CODEC board is pluged&amp;amp;nbsp;into the I2S_cn3. I2s0 is turned on by default, so the CODEC can be turned on directly using the command.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jinmin.xu</name></author>	</entry>

	<entry>
		<id>https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19469&amp;oldid=prev</id>
		<title>Jinmin.xu: Created page with &quot;= Overview =  ROM-5780 supports two CODEC RT5640 using i2s interface and only one codec is turned on by default(i2s0).  If ROM-DB5901 is used as the ROM-5780&amp;nbsp;carrier&amp;nbsp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://ess-wiki.advantech.com.tw/wiki/index.php?title=How_to_Config_I2S&amp;diff=19469&amp;oldid=prev"/>
				<updated>2020-09-30T07:05:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Overview =  ROM-5780 supports two CODEC RT5640 using i2s interface and only one codec is turned on by default(i2s0).  If ROM-DB5901 is used as the ROM-5780 carrier&amp;amp;nbsp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
ROM-5780 supports two CODEC RT5640 using i2s interface and only one codec is turned on by default(i2s0).&lt;br /&gt;
&lt;br /&gt;
If ROM-DB5901 is used as the ROM-5780&amp;amp;nbsp;carrier&amp;amp;nbsp;board,&amp;amp;nbsp;then the interface to connect is as follows. The compatible small i2s CODEC board model is ROM-EG57&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;0&amp;quot; width=&amp;quot;500&amp;quot; style=&amp;quot;width: 261px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 125px;&amp;quot; | I2s(ROM5780)&lt;br /&gt;
| style=&amp;quot;width: 127px;&amp;quot; | &lt;br /&gt;
Interface(DB5901)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 125px;&amp;quot; | &lt;br /&gt;
I2s0&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 127px;&amp;quot; | &lt;br /&gt;
i2s_cn3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width: 125px;&amp;quot; | &lt;br /&gt;
i2s1&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;width: 127px;&amp;quot; | &lt;br /&gt;
i2c_cn4&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
The following configuration is only for&amp;amp;nbsp;ROM-5780&amp;amp;nbsp;with&amp;amp;nbsp;the&amp;amp;nbsp;carrier board ROM-DB5901.&lt;br /&gt;
&lt;br /&gt;
== Use the CODEC of the i2s0 for recording and playback. ==&lt;br /&gt;
&lt;br /&gt;
The CODEC board is pluged&amp;amp;nbsp;into the I2S_cn3. I2s0 is turned on by default, so the CODEC can be turned on directly using the command.&lt;br /&gt;
&lt;br /&gt;
1.&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Recording audio data&lt;br /&gt;
&amp;lt;pre&amp;gt;root@linaro-alip:~# arecord -Dhw:0,0 -c 2 -f S16_LE -r 8000 -d 5 -t wav test.wav&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Play the recorded test audio&lt;br /&gt;
&amp;lt;pre&amp;gt;root@linaro-alip:~# aplay –Dhw:0,0 -t wav test.wav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use the CODEC of the I2S1 for recording and playback. ==&lt;br /&gt;
&lt;br /&gt;
The second codec needs to be configured before using it.&lt;br /&gt;
&lt;br /&gt;
If two i2S codec board are both inserted, then the second i2s CARD generated automatically by kernel is 1.&lt;br /&gt;
&lt;br /&gt;
If only the second I2S1 interface, i2s_CN4, is plugged then the&amp;amp;nbsp;i2s CARD is 0&lt;br /&gt;
&lt;br /&gt;
$Card under the following command please use the number 0 or 1&lt;br /&gt;
&amp;lt;pre&amp;gt;root@linaro-alip:~# amixer -c $CARD cset name='DAI select' '1:1|2:2'&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='RECMIXL BST1 Switch' 1&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='RECMIXR BST1 Switch' 1&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='RECMIXL BST2 Switch' 0&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='RECMIXR BST2 Switch' 0&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='Stereo ADC1 Mux' 'ADC'&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='Stereo ADC MIXL ADC1 Switch' 1&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='Stereo ADC MIXR ADC1 Switch' 1&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='Stereo ADC MIXL ADC2 Switch' 0&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='Stereo ADC MIXR ADC2 Switch' 0&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='ADC Capture Switch' 1 1&lt;br /&gt;
root@linaro-alip:~# amixer -c $CARD cset name='ADC Capture Volume' 47 47&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Recording audio data&lt;br /&gt;
&amp;lt;pre&amp;gt;root@linaro-alip:~# arecord -Dhw:$CARD,0 -c 2 -f S16_LE -r 8000 -d 5 -t wav test.wav&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Play the recorded test audio&lt;br /&gt;
&amp;lt;pre&amp;gt;root@linaro-alip:~# aplay –Dhw:$CARD,0 -t wav test.wav&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jinmin.xu</name></author>	</entry>

	</feed>