All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815
@ 2016-11-23  5:22 Shrirang Bagul
  2016-11-24 12:18 ` Liam Girdwood
  2016-11-27 18:02 ` Pierre-Louis Bossart
  0 siblings, 2 replies; 3+ messages in thread
From: Shrirang Bagul @ 2016-11-23  5:22 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

Hi,

I'm attempting to enable audio on Intel Atom E3815. I have a board with RT5660
codec from Realtek connected to the SoC over I2S2. The codec can be configured
over I2C bus. The board supports External Mic In and Line Out connections for
audio.

I am running Ubuntu 16.04 LTS with kernel v4.4.

To support RT5660 codec, I have backported patches -
d01580c ASoC: rt5660: enable MCLK detection
2b26dd4 ASoC: rt5660: add rt5660 codec driver
from https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
topic/rt5660 branch

To support I2S_CLK using MCLK I've also backported the patch to support PMC
platform clocks -
[13/17] clk: x86: Add Atom PMC platform clocks (https://patchwork.kernel.org/pat
ch/9277989/)

To understand the I2S over LPE architecture for audio I'm referring to the Intel
Atom Processor E3800: Datasheet (http://www.intel.com/content/dam/www/public/us/
en/documents/datasheets/atom-e3800-family-datasheet.pdf) and discussions on
alsa-devel mailing list thread: http://mailman.alsa-project.org/pipermail/alsa-d
evel/2015-November/100303.html

After implementing the machine driver byt-rt5660.c (by referring to byt-
rt5640.c), the CPU DAI baytrail-pcm-audio is registered successfully and the
fw_sst_0f28.bin-48kHz_i2s_master firmware also is loaded without any errors. It
is possible to configure the codec controls using alsamixer. 

However, an attempt to record results in an empty PCM file and no audio is heard
 if I try to playback using aplay.

I'm clueless on how to proceed from this point onward in getting the audio to
work on this board. The ouput of alsa-info.sh, clk_summary & gpio config from
debugfs and dmesg log is attached with this message. I have published the source
code here: http://kernel.ubuntu.com/git/snb/ubuntu-xenial.git/log/?h=x-master-au
dio-test

I would highly appreciate your help!

-Shrirang

[-- Attachment #2: logs.tar.bz2 --]
[-- Type: application/x-bzip-compressed-tar, Size: 31774 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815
  2016-11-23  5:22 ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815 Shrirang Bagul
@ 2016-11-24 12:18 ` Liam Girdwood
  2016-11-27 18:02 ` Pierre-Louis Bossart
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2016-11-24 12:18 UTC (permalink / raw)
  To: Shrirang Bagul; +Cc: alsa-devel

On Wed, 2016-11-23 at 13:22 +0800, Shrirang Bagul wrote:
> Hi,
> 
> I'm attempting to enable audio on Intel Atom E3815. I have a board with RT5660
> codec from Realtek connected to the SoC over I2S2. The codec can be configured
> over I2C bus. The board supports External Mic In and Line Out connections for
> audio.
> 
> I am running Ubuntu 16.04 LTS with kernel v4.4.
> 
> To support RT5660 codec, I have backported patches -
> d01580c ASoC: rt5660: enable MCLK detection
> 2b26dd4 ASoC: rt5660: add rt5660 codec driver
> from https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
> topic/rt5660 branch
> 
> To support I2S_CLK using MCLK I've also backported the patch to support PMC
> platform clocks -
> [13/17] clk: x86: Add Atom PMC platform clocks (https://patchwork.kernel.org/pat
> ch/9277989/)
> 
> To understand the I2S over LPE architecture for audio I'm referring to the Intel
> Atom Processor E3800: Datasheet (http://www.intel.com/content/dam/www/public/us/
> en/documents/datasheets/atom-e3800-family-datasheet.pdf) and discussions on
> alsa-devel mailing list thread: http://mailman.alsa-project.org/pipermail/alsa-d
> evel/2015-November/100303.html
> 
> After implementing the machine driver byt-rt5660.c (by referring to byt-
> rt5640.c), the CPU DAI baytrail-pcm-audio is registered successfully and the
> fw_sst_0f28.bin-48kHz_i2s_master firmware also is loaded without any errors. It
> is possible to configure the codec controls using alsamixer. 
> 
> However, an attempt to record results in an empty PCM file and no audio is heard
>  if I try to playback using aplay.
> 

I'm assuming the pointer is being incremented on playback ? It's
sometimes helpful to disable pulseaudio and try directly with aplay.

You can also try aplay -Dhw0,0 --test-position

If the position is moving then it's likely the codec mixer configuration
is missing something or your MCLK is missing ?

The record result seems like the DSP is not capturing data. Can you try
again without pulseaudio and use arecord -Dhw:0,0 --test-position. Is
there anything in dmesg after plyback/capture ?
 

> I'm clueless on how to proceed from this point onward in getting the audio to
> work on this board. The ouput of alsa-info.sh, clk_summary & gpio config from
> debugfs and dmesg log is attached with this message. I have published the source
> code here: http://kernel.ubuntu.com/git/snb/ubuntu-xenial.git/log/?h=x-master-au
> dio-test
> 
> I would highly appreciate your help!
> 

Liam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815
  2016-11-23  5:22 ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815 Shrirang Bagul
  2016-11-24 12:18 ` Liam Girdwood
@ 2016-11-27 18:02 ` Pierre-Louis Bossart
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2016-11-27 18:02 UTC (permalink / raw)
  To: Shrirang Bagul, alsa-devel

On 11/22/16 11:22 PM, Shrirang Bagul wrote:
> Hi,
>
> I'm attempting to enable audio on Intel Atom E3815. I have a board with RT5660
> codec from Realtek connected to the SoC over I2S2. The codec can be configured
> over I2C bus. The board supports External Mic In and Line Out connections for
> audio.
>
> I am running Ubuntu 16.04 LTS with kernel v4.4.
>
> To support RT5660 codec, I have backported patches -
> d01580c ASoC: rt5660: enable MCLK detection
> 2b26dd4 ASoC: rt5660: add rt5660 codec driver
> from https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
> topic/rt5660 branch
>
> To support I2S_CLK using MCLK I've also backported the patch to support PMC
> platform clocks -
> [13/17] clk: x86: Add Atom PMC platform clocks (https://patchwork.kernel.org/pat
> ch/9277989/)
>
> To understand the I2S over LPE architecture for audio I'm referring to the Intel
> Atom Processor E3800: Datasheet (http://www.intel.com/content/dam/www/public/us/
> en/documents/datasheets/atom-e3800-family-datasheet.pdf) and discussions on
> alsa-devel mailing list thread: http://mailman.alsa-project.org/pipermail/alsa-d
> evel/2015-November/100303.html
>
> After implementing the machine driver byt-rt5660.c (by referring to byt-
> rt5640.c), the CPU DAI baytrail-pcm-audio is registered successfully and the
> fw_sst_0f28.bin-48kHz_i2s_master firmware also is loaded without any errors. It
> is possible to configure the codec controls using alsamixer.
>
> However, an attempt to record results in an empty PCM file and no audio is heard
>  if I try to playback using aplay.
>
> I'm clueless on how to proceed from this point onward in getting the audio to
> work on this board. The ouput of alsa-info.sh, clk_summary & gpio config from
> debugfs and dmesg log is attached with this message. I have published the source
> code here: http://kernel.ubuntu.com/git/snb/ubuntu-xenial.git/log/?h=x-master-au
> dio-test

You are mixing different drivers here. if you started from byt-rt5640.c 
then you started from a legacy driver that no one uses any longer in any 
products and which does not enable the 19.2 MHz MCLK which is easier to use.
You should start from bytcr_rt5640 which does handle the MCLK and is 
more robust against BIOS issues.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-27 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23  5:22 ASoC: Intel: Enabling LPE audio over I2S on Intel Atom E3815 Shrirang Bagul
2016-11-24 12:18 ` Liam Girdwood
2016-11-27 18:02 ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.