<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git, branch tegra</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>colibri_t20: make sure to un-reset aca</title>
<updated>2020-06-10T08:42:35+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2020-06-10T08:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e3cb65b1b4bff69d925e3c9d4871de9fc9fe38a'/>
<id>5e3cb65b1b4bff69d925e3c9d4871de9fc9fe38a</id>
<content type='text'>
Related-to: ELB-2300
Signed-off-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related-to: ELB-2300
Signed-off-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t30: fix record/playback for sgtl5000 codec</title>
<updated>2019-09-09T12:04:37+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-09-09T12:04:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=babaf479582f7697fbfd4c001945fbfb766d914d'/>
<id>babaf479582f7697fbfd4c001945fbfb766d914d</id>
<content type='text'>
Backported commit f997df18c0e4c988de49e984329cefdf6e13ed86

According to the manual [1], SYS_MCLK should base on SYS_FS, not on sample rate.

Calculating SYS_MCLK using sample rate only prevents playing/recording
samples with rate &lt; 16 kHz:
---------------------------------------------------------------
root@apalis-t30:~# aplay test-8k-sample.wav
Playing WAVE 'test-8k-sample.wav' : Signed 16 bit
[...] tegra-snd-apalis-tk1-sgtl5000 tegra-snd-apalis-tk1-sgtl5000.0: ASoC: machine hw_params failed: -22
Little Endian, Rate 8000 Hz, Stereo
aplay: set_params:1403: Unable to install hw params:
...
---------------------------------------------------------------

Using the helper from sgtl5000.h fixes this issue.

To keep determination of sys_fs solid, use a helper in device driver.

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported commit f997df18c0e4c988de49e984329cefdf6e13ed86

According to the manual [1], SYS_MCLK should base on SYS_FS, not on sample rate.

Calculating SYS_MCLK using sample rate only prevents playing/recording
samples with rate &lt; 16 kHz:
---------------------------------------------------------------
root@apalis-t30:~# aplay test-8k-sample.wav
Playing WAVE 'test-8k-sample.wav' : Signed 16 bit
[...] tegra-snd-apalis-tk1-sgtl5000 tegra-snd-apalis-tk1-sgtl5000.0: ASoC: machine hw_params failed: -22
Little Endian, Rate 8000 Hz, Stereo
aplay: set_params:1403: Unable to install hw params:
...
---------------------------------------------------------------

Using the helper from sgtl5000.h fixes this issue.

To keep determination of sys_fs solid, use a helper in device driver.

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: add helpers to calculate mclk</title>
<updated>2019-09-09T11:56:07+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-09-02T15:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d26e03d1e61da1ba12f0fb84d5ee13a8810c0d59'/>
<id>d26e03d1e61da1ba12f0fb84d5ee13a8810c0d59</id>
<content type='text'>
Calculate SYS_MCLK using sample rate or SYS_FS.
These helpers allow to simplify a code to set up external system clock
for different sample rates.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calculate SYS_MCLK using sample rate or SYS_FS.
These helpers allow to simplify a code to set up external system clock
for different sample rates.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: Fix charge pump source assignment</title>
<updated>2019-09-09T11:49:10+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-09-09T11:49:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e90330d60bd7c0af068c43ae19374f46d6cdd7a0'/>
<id>e90330d60bd7c0af068c43ae19374f46d6cdd7a0</id>
<content type='text'>
Backported commit 8326ab1285e71e24481d8e1eee3e72a6b3abbb38

If VDDA != VDDIO and any of them is greater than 3.1V, charge pump
source can be assigned automatically [1].

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported commit 8326ab1285e71e24481d8e1eee3e72a6b3abbb38

If VDDA != VDDIO and any of them is greater than 3.1V, charge pump
source can be assigned automatically [1].

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: Fix of unmute outputs on prob</title>
<updated>2019-09-09T11:42:30+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-09-09T11:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=befb3f9ac53a15141c15abaf4a366655115c633e'/>
<id>befb3f9ac53a15141c15abaf4a366655115c633e</id>
<content type='text'>
Backported commit 8337f764b45e122bd17b8c84b7ac26da3086fe26

To enable "zero cross detect" for ADC/HP, change
HP_ZCD_EN/ADC_ZCD_EN bits only instead of writing the whole
CHIP_ANA_CTRL register.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported commit 8337f764b45e122bd17b8c84b7ac26da3086fe26

To enable "zero cross detect" for ADC/HP, change
HP_ZCD_EN/ADC_ZCD_EN bits only instead of writing the whole
CHIP_ANA_CTRL register.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: add ADC/HP/LINEOUT mute control</title>
<updated>2019-09-09T11:37:01+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-05-16T11:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e270a134532cffab5229e1a280c056ea23b9548'/>
<id>7e270a134532cffab5229e1a280c056ea23b9548</id>
<content type='text'>
Backported from commit 19a1d41649f695658a67898dcb9312de02878eb1.

This control mute/unmute the ADC input of SGTL5000
using its CHIP_ANA_CTRL register.

Tuned: add Headphone and Line-Out mute/unmute controlling.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported from commit 19a1d41649f695658a67898dcb9312de02878eb1.

This control mute/unmute the ADC input of SGTL5000
using its CHIP_ANA_CTRL register.

Tuned: add Headphone and Line-Out mute/unmute controlling.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: Fix definition of VAG Ramp Control</title>
<updated>2019-09-09T11:37:01+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-05-03T07:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25af6fc2a81365d075a5aaaa3bfa674278d18daa'/>
<id>25af6fc2a81365d075a5aaaa3bfa674278d18daa</id>
<content type='text'>
Backported from commit 55e23d488cd1367638ee304bd8bb6210f53d13db.

SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
correct definition makes device probing code more clear.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported from commit 55e23d488cd1367638ee304bd8bb6210f53d13db.

SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
correct definition makes device probing code more clear.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: sgtl5000: Improve VAG power and mute control</title>
<updated>2019-09-09T11:01:29+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-05-20T07:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f474033a6822c0a4387a351834b7c421faf56acc'/>
<id>f474033a6822c0a4387a351834b7c421faf56acc</id>
<content type='text'>
Backported from commit e6e98e2e05baa3862ac7d1d2334f88ec927c8f66.

VAG power control is improved to fit the manual [1]. This patch fixes as
minimum one bug: if customer muxes Headphone to Line-In right after boot,
the VAG power remains off that leads to poor sound quality from line-in.

I.e. after boot:
  - Connect sound source to Line-In jack;
  - Connect headphone to HP jack;
  - Run following commands:
  $ amixer set 'Headphone' 80%
  $ amixer set 'Headphone Mux' LINE_IN

Change VAG power on/off control according to the following algorithm:
  - turn VAG power ON on the 1st incoming event.
  - keep it ON if there is any active VAG consumer (ADC/DAC/HP/Line-In).
  - turn VAG power OFF when there is the latest consumer's pre-down event
    come.
  - always delay after VAG power OFF to avoid pop.
  - delay after VAG power ON if the initiative consumer is Line-In, this
    prevents pop during line-in muxing.

According to the data sheet [1], to avoid any pops/clicks,
the outputs should be muted during input/output
routing changes.

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support")
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backported from commit e6e98e2e05baa3862ac7d1d2334f88ec927c8f66.

VAG power control is improved to fit the manual [1]. This patch fixes as
minimum one bug: if customer muxes Headphone to Line-In right after boot,
the VAG power remains off that leads to poor sound quality from line-in.

I.e. after boot:
  - Connect sound source to Line-In jack;
  - Connect headphone to HP jack;
  - Run following commands:
  $ amixer set 'Headphone' 80%
  $ amixer set 'Headphone Mux' LINE_IN

Change VAG power on/off control according to the following algorithm:
  - turn VAG power ON on the 1st incoming event.
  - keep it ON if there is any active VAG consumer (ADC/DAC/HP/Line-In).
  - turn VAG power OFF when there is the latest consumer's pre-down event
    come.
  - always delay after VAG power OFF to avoid pop.
  - delay after VAG power ON if the initiative consumer is Line-In, this
    prevents pop during line-in muxing.

According to the data sheet [1], to avoid any pops/clicks,
the outputs should be muted during input/output
routing changes.

[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf

Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support")
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ASoC: Define a set of DAPM pre/post-up events</title>
<updated>2019-09-09T10:31:23+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@toradex.com</email>
</author>
<published>2019-05-14T15:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c299ce7d7cb3859ffab664eee4107f749df1a5ba'/>
<id>c299ce7d7cb3859ffab664eee4107f749df1a5ba</id>
<content type='text'>
Prepare to use SND_SOC_DAPM_PRE_POST_PMU definition to
reduce coming code size and make it more readable.

Cc: stable@vger.kernel.org
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;

Patch-cc: stable
Patch-cc: Sasha Levin &lt;sashal@kernel.org&gt;
Series-changes: 5
- Add explicit stable tag

Series-changes: 4
- CC the patch to kernel-stable

Series-changes: 2
- Fix patch formatting
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare to use SND_SOC_DAPM_PRE_POST_PMU definition to
reduce coming code size and make it more readable.

Cc: stable@vger.kernel.org
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@toradex.com&gt;
Reviewed-by: Marcel Ziswiler &lt;marcel.ziswiler@toradex.com&gt;
Reviewed-by: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;

Patch-cc: stable
Patch-cc: Sasha Levin &lt;sashal@kernel.org&gt;
Series-changes: 5
- Add explicit stable tag

Series-changes: 4
- CC the patch to kernel-stable

Series-changes: 2
- Fix patch formatting
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t20/t30: defconfig: Add nf_filter</title>
<updated>2019-01-29T13:06:32+00:00</updated>
<author>
<name>Philippe Schenker</name>
<email>philippe.schenker@toradex.com</email>
</author>
<published>2019-01-29T13:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37b9f033652bc7493a4903e0ad7c1bfa17b55cc8'/>
<id>37b9f033652bc7493a4903e0ad7c1bfa17b55cc8</id>
<content type='text'>
For iptables filtering to work we need the NF_FILTER kernel module.

Signed-off-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For iptables filtering to work we need the NF_FILTER kernel module.

Signed-off-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
