From: Ryan McClue <re.mcclue@protonmail.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Intel HDA Driver Issue With PCM RW Interleaved
Date: Mon, 26 Jul 2021 06:37:52 +0000 [thread overview]
Message-ID: <Ku86LtfuLk75iQJb_s7DVAxjlOhldXkAV4wBG4bROaixMRleq2XwF8-x9xmi-eNQC8G1CP-RvfXNM5Cob3XPnKNcjXqaMAnRLMyTI8PWfZY=@protonmail.com> (raw)
Hi,
I'm trying to play a simple PCM buffer single threaded without buffer underrun.
Program source:https://gist.github.com/takaswie/d8a9553c230971d974a3dfc759b2ff67
(struct snd_pcm_sw_params).start_thresholdis altered so as to allow specifying the start of audio frame transmission and prevent underrun issues.
In my application, onioctl(fd, SNDRV_PCM_IOCTL_STATUS, &status), I receive:File descriptor in bad state
Output of$(dmesg)is:[ 69.013084] snd_hda_intel 0000:00:1f.3: Too big adjustment 128
From a previous response on thealsa-develmailing list:
> The driver has some small number of periods to be
> put at the beginning of the buffer for correcting the reported
> position. Judging from the message, you seem to have set a quite high
> rate and a very shot number, and that's possibly too tight to operate
> properly.
However, I'm not sure what to change in this code to address this issue and get it to work. I tried alteringMY_PLAYBACK_DURATIONandparams.start_thresholdbut get the same error.
The program dumps the current hardware parameters:
Current hardware parameters:
Changed parameters:
access
format
subformat
sample-bits
frame-bits
channels
rate
period-time
period-size
period-bytes
periods
buffer-time
buffer-size
buffer-bytes
tick-time
Runtime parameters:
access:
readwrite-interleaved
format:
s16-le
subformat:
std
sample-bits:
[16, 16], integer,
frame-bits:
[32, 32], integer,
channels:
[2, 2], integer,
rate:
[48000, 48000], integer,
period-time:
(666, 667),
period-size:
[32, 32], integer,
periods:
[32, 32], integer,
buffer-time:
(21333, 21334),
buffer-size:
[1024, 1024], integer,
buffer-bytes:
[4096, 4096], integer,
tick-time:
[0, 0], integer,
info:
mmap
mmap-valid
interleaved
block-transfer
pause
sync-start
no-period-wakeup
has-wall-clock
has-link-atime
has-link-synchronized-atime
most-significant-bits: 16
rate_num: 48000
rate_den: 1
Thanks
next reply other threads:[~2021-07-27 8:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 6:37 Ryan McClue [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-05-19 5:48 Intel HDA Driver Issue With PCM RW Interleaved re.mcclue
2021-05-19 16:32 ` 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='Ku86LtfuLk75iQJb_s7DVAxjlOhldXkAV4wBG4bROaixMRleq2XwF8-x9xmi-eNQC8G1CP-RvfXNM5Cob3XPnKNcjXqaMAnRLMyTI8PWfZY=@protonmail.com' \
--to=re.mcclue@protonmail.com \
--cc=alsa-devel@alsa-project.org \
/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 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.