All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "re.mcclue" <re.mcclue@protonmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Intel HDA Driver Issue With PCM RW Interleaved
Date: Wed, 19 May 2021 18:32:15 +0200	[thread overview]
Message-ID: <s5hy2cahegg.wl-tiwai@suse.de> (raw)
In-Reply-To: <3GXvg2z0sYlmlwylckstDNNXwCFBbCbPmclFAPK-zN6DMEdtpCMZFcNRVpCSGt9IccFbdl8ci5_hRe92wTsFpbwCEpLMAr3Yg4D60LjEbyU=@protonmail.com>

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

  reply	other threads:[~2021-05-19 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  5:48 Intel HDA Driver Issue With PCM RW Interleaved re.mcclue
2021-05-19 16:32 ` Takashi Iwai [this message]
2021-07-26  6:37 Ryan McClue

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=s5hy2cahegg.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=re.mcclue@protonmail.com \
    /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.