From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Jerome Anand <jerome.anand@intel.com>
Subject: Re: [PATCH 0/4] Yet another patchset for LPE audio refactoring
Date: Mon, 6 Feb 2017 15:16:22 -0600 [thread overview]
Message-ID: <4b313a18-f7a0-83f6-3f97-2daadec6ebf9@linux.intel.com> (raw)
In-Reply-To: <s5hshnrf88i.wl-tiwai@suse.de>
On 2/6/17 1:07 PM, Takashi Iwai wrote:
> On Fri, 03 Feb 2017 17:43:56 +0100,
> Takashi Iwai wrote:
>>
>> Hi,
>>
>> this is the final part of my cleanup / refactoring patchsets for Intel
>> LPE audio. Now the PCM stream engine has been rewritten. It supports
>> more flexible configuration, not only fixed 4 periods, for example,
>> yet with a lot of code reduction.
>>
>> As usual, the patches are found in topic/intel-lpe-audio-cleanup
>> branch.
>
> So far, from my side, now most of changes have been submitted /
> merged. But I still have some unclear things in the code.
>
> - The PCM format: the code contains the handling of S16_LE, but it
> doesn't seem work when I enabled the info bit. What's missing?
> Also U24_LE format is ever supported...? How?
In the initial version the samples were assumed to be using the 24 lsb
of a 32-bit word. 16-bit data can be supported as long as it was
left-shifted before being written to the ring buffer.
For stereo the channels are assumed to be interleaved in Layout 0 (left,
right). For more than 2ch, all channels for the same sample are inserted
consecutively (ie. no blocks of channels). In the initial version the
number of channels is assumed to be even and one bogus channel had to be
inserted for odd number of channels.
in more recent versions the samples could also be represented as using
the 24 msb and the requirement for the bogus channel was removed but I
never worked on this personally and the documentation is far from clear.
At any rate, here's what I see in the description of the
STREAM_X_LPE_AUD_CONFIG registers for CHT:
Bit 15:
1: DP mode
0: HDMI (default)
Bit14:
1: no bogus sample for odd channels
0: bogus sample for off channels (default)
Bit13:
1: MSB is bit 31 of 32-bit container
0: MSB is bit 23 of 32-bit container (default)
Bit 12:
1: 16-bit container
0: 32-bit container (default)
Bit 11:
1: send silence stream
0: send null packets (default)
I see no evidence that unsigned data is supported.
I would really take all these configurations with caution, it's not
clear to me if the documentation reflects the actual implementation.
Note that the hardware can swap channels, I don't remember if this is
currently enabled.
>
> - The behavior in had_process_buffer_underrun() isn't clear enough.
> Or, more exactly, the behavior of AUD_HDMI_STATUS reg and AUD_CONFIG
> reg look complex, and need a bit more description for readers
> (including me).
>
> Can you guys enlighten a bit?
For the LPE_AUDIO_Buffer_config register (65020h), there is one
important field
10:8: DMA Fifo watermark. The audio unit has 8x64 bytes, this register
define when to fetch data. Bottom line it'd be wise to avoid rewinding
below that FIFO size...
There are two possible interrupt sources in the
STREAM_X_LPE_AUD_HDMI_STATUS (65064h)
Bit 31: sample buffer underrun. HDMI audio unit did not have enough
samples to insert in video frame (cleared by writing a one)
Bit 29: buffer done status, write 1 to clear
Bit 15: sample buffer underrun interrupt enable
Hope this helps
-Pierre
>
>
> thanks,
>
> Takashi
>
next prev parent reply other threads:[~2017-02-06 21:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 16:43 [PATCH 0/4] Yet another patchset for LPE audio refactoring Takashi Iwai
2017-02-03 16:43 ` [PATCH 1/4] ALSA: x86: Don't pass SNDRV_PCM_INFO_BATCH flag Takashi Iwai
2017-02-03 19:39 ` Pierre-Louis Bossart
2017-02-03 20:13 ` Takashi Iwai
2017-02-03 23:13 ` Pierre-Louis Bossart
2017-02-04 7:57 ` Takashi Iwai
2017-02-06 19:01 ` Takashi Iwai
2017-02-06 21:27 ` Pierre-Louis Bossart
2017-02-06 21:51 ` Takashi Iwai
2017-02-03 16:43 ` [PATCH 2/4] ALSA: x86: Explicit specify 32bit DMA Takashi Iwai
2017-02-03 16:43 ` [PATCH 3/4] ALSA: x86: Don't check connection in lowlevel accessors Takashi Iwai
2017-02-03 16:44 ` [PATCH 4/4] ALSA: x86: Refactor PCM process engine Takashi Iwai
2017-02-03 19:47 ` Pierre-Louis Bossart
2017-02-03 20:11 ` Takashi Iwai
2017-02-03 23:22 ` Pierre-Louis Bossart
2017-02-04 7:51 ` Takashi Iwai
2017-02-06 11:22 ` Takashi Iwai
2017-02-06 15:46 ` Pierre-Louis Bossart
2017-02-06 15:54 ` Takashi Iwai
2017-02-06 16:00 ` Pierre-Louis Bossart
2017-02-06 19:07 ` [PATCH 0/4] Yet another patchset for LPE audio refactoring Takashi Iwai
2017-02-06 21:16 ` Pierre-Louis Bossart [this message]
2017-02-06 21:45 ` Takashi Iwai
2017-02-06 23:56 ` Pierre-Louis Bossart
2017-02-07 1:22 ` Pierre-Louis Bossart
2017-02-07 6:39 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b313a18-f7a0-83f6-3f97-2daadec6ebf9@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=jerome.anand@intel.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).