* Intel HDA Driver Issue With PCM RW Interleaved
@ 2021-05-19 5:48 re.mcclue
2021-05-19 16:32 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: re.mcclue @ 2021-05-19 5:48 UTC (permalink / raw)
To: alsa-devel
I'm trying to play PCM buffer single threaded without buffer underrun.
Program source: https://gist.github.com/takaswie/d8a9553c230971d974a3dfc759b2ff67
(struct snd_pcm_sw_params).start_threshold is altered so as to allow specifying the start of audio frame transmission and prevent underrun issues.
In my application, on ioctl(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
What is causing this issue and how can I solve it?
Thanks
Sent with [ProtonMail](https://protonmail.com) Secure Email.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Intel HDA Driver Issue With PCM RW Interleaved
2021-05-19 5:48 Intel HDA Driver Issue With PCM RW Interleaved re.mcclue
@ 2021-05-19 16:32 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-05-19 16:32 UTC (permalink / raw)
To: re.mcclue; +Cc: alsa-devel
On Wed, 19 May 2021 07:48:52 +0200,
re.mcclue wrote:
>
> I'm trying to play PCM buffer single threaded without buffer underrun.
> Program source: https://gist.github.com/takaswie/d8a9553c230971d974a3dfc759b2ff67
> (struct snd_pcm_sw_params).start_threshold is altered so as to allow specifying the start of audio frame transmission and prevent underrun issues.
> In my application, on ioctl(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
> What is causing this issue and how can I solve it?
The warning message is likely a red herring and it's irrelevant from
your bug itself. 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.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Intel HDA Driver Issue With PCM RW Interleaved
@ 2021-07-26 6:37 Ryan McClue
0 siblings, 0 replies; 3+ messages in thread
From: Ryan McClue @ 2021-07-26 6:37 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-27 8:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 5:48 Intel HDA Driver Issue With PCM RW Interleaved re.mcclue
2021-05-19 16:32 ` Takashi Iwai
2021-07-26 6:37 Ryan McClue
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.