All of lore.kernel.org
 help / color / mirror / Atom feed
* realtek ALC1220 : recording samplerate 10x too slow
@ 2022-03-21 22:01 cblondin
  2022-03-22 15:26 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: cblondin @ 2022-03-21 22:01 UTC (permalink / raw)
  To: alsa-devel

Hi,
I was redirected here by pulseaudio maintainers for an issue I thought was at that layer :
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1344

After a fresh reboot, arecord / parecord work fine, and the level meters in pavucontrol react normally.
If I start audacity, the card gets in a state where the level meters become sluggish, and recording either drops 90% of samples, or records approximately 10x too fast.
Playback is always ok, unaffected.

I cannot fix that state other than by a reboot. The obvious "closing audacity", restarting the pulseaudio daemon, have no effect.
Tried kernels 5.15.24 and a recent 5.17; same problem.

I posted some detailed debugging info on that pulseaudio issue tracker, as well as pastebinned alsa-info.sh output here:
http://alsa-project.org/db/?f=7ee784003379252acfef25de5fecbdfd559fe342

The problematic hardware is Card 1, Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457].

Test command :
pasuspender -- arecord -D hw:1,0 -f S16_LE -c 2 -r 44100 arec_pasusp.wav

Here's an example recording of me saying 'test' :
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/uploads/5a51081fcd55ecd705df258c1a0fd2b6/arec_44k.wav

I have no ~/.asoundrc or related files.

Anything I can try to narrow down the cause of this ?


Thanks!
Chris

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

* Re: realtek ALC1220 : recording samplerate 10x too slow
  2022-03-21 22:01 realtek ALC1220 : recording samplerate 10x too slow cblondin
@ 2022-03-22 15:26 ` Takashi Iwai
  2022-03-23  0:49   ` fenugrec
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2022-03-22 15:26 UTC (permalink / raw)
  To: cblondin; +Cc: alsa-devel

On Mon, 21 Mar 2022 23:01:51 +0100,
cblondin@mail.com wrote:
> 
> Hi,
> I was redirected here by pulseaudio maintainers for an issue I thought was at that layer :
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1344
> 
> After a fresh reboot, arecord / parecord work fine, and the level meters in pavucontrol react normally.
> If I start audacity, the card gets in a state where the level meters become sluggish, and recording either drops 90% of samples, or records approximately 10x too fast.
> Playback is always ok, unaffected.
> 
> I cannot fix that state other than by a reboot. The obvious "closing audacity", restarting the pulseaudio daemon, have no effect.
> Tried kernels 5.15.24 and a recent 5.17; same problem.
> 
> I posted some detailed debugging info on that pulseaudio issue tracker, as well as pastebinned alsa-info.sh output here:
> http://alsa-project.org/db/?f=7ee784003379252acfef25de5fecbdfd559fe342
> 
> The problematic hardware is Card 1, Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457].
> 
> Test command :
> pasuspender -- arecord -D hw:1,0 -f S16_LE -c 2 -r 44100 arec_pasusp.wav
> 
> Here's an example recording of me saying 'test' :
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/uploads/5a51081fcd55ecd705df258c1a0fd2b6/arec_44k.wav
> 
> I have no ~/.asoundrc or related files.
> 
> Anything I can try to narrow down the cause of this ?

Is audacity recording via pulseaudio?  And it happens only with
audacity?  That is, if you keep arecord running (over pulseaudio), and
start audacity in parallel, does the problem still appear?

In anyway, you need to try different ways to trigger the problem,
without the need of complex sound system setup.


thanks,

Takashi

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

* Re: realtek ALC1220 : recording samplerate 10x too slow
  2022-03-22 15:26 ` Takashi Iwai
@ 2022-03-23  0:49   ` fenugrec
  2022-03-23  9:34     ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: fenugrec @ 2022-03-23  0:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Thanks for the reply.

> Is audacity recording via pulseaudio?

It's set to "ALSA" for its host interface, and it doesn't seem to offer other options.

Other software like obs-studio works fine. I haven't done a comprehensive survey but I'm happy to try other methods. I doubt this is an audacity bug since even after exiting, it leaves my audio device in a broken state.

> That is, if you keep arecord running (over pulseaudio), and
> start audacity in parallel

Good idea . I just tried, and the recording becomes garbled at the precise instant where audacity is started !


> without the need of complex sound system setup.

This is already as simple as I can make it .... reboot,  run arecord / audacity, and the problem is 100% repeatable.


Regards,
Chris

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

* Re: realtek ALC1220 : recording samplerate 10x too slow
  2022-03-23  0:49   ` fenugrec
@ 2022-03-23  9:34     ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2022-03-23  9:34 UTC (permalink / raw)
  To: fenugrec; +Cc: alsa-devel

On Wed, 23 Mar 2022 01:49:34 +0100,
fenugrec@mail.com wrote:
> 
> Thanks for the reply.
> 
> > Is audacity recording via pulseaudio?
> 
> It's set to "ALSA" for its host interface, and it doesn't seem to offer other options.
> 
> Other software like obs-studio works fine. I haven't done a comprehensive survey but I'm happy to try other methods. I doubt this is an audacity bug since even after exiting, it leaves my audio device in a broken state.

Does it communicate with alsa-lib pulse plugin?  Or is it the direct
ALSA device access?  The exact setups are unclear, so it's difficult
to guess what's going on.

> > That is, if you keep arecord running (over pulseaudio), and
> > start audacity in parallel
> 
> Good idea . I just tried, and the recording becomes garbled at the precise instant where audacity is started !

Do you mean that the sound from arecord gets garbled?
And, did you record with arecord, or with parecord?  And if it's
arecord, is it over pulseaudio (with alsa-lib pulse plugin)?

> > without the need of complex sound system setup.
> 
> This is already as simple as I can make it .... reboot,  run arecord / audacity, and the problem is 100% repeatable.

No, I mean the way to trigger without audacity but only with simple
arecord or other command-line sequences.


Takashi

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

* Re: realtek ALC1220 : recording samplerate 10x too slow
@ 2022-03-23 15:12 fenugrec
  0 siblings, 0 replies; 6+ messages in thread
From: fenugrec @ 2022-03-23 15:12 UTC (permalink / raw)
  To: alsa-devel

Hi,

> Does it communicate with alsa-lib pulse plugin?  Or is it the direct
> ALSA device access?

Ah, good question. I'm not sure how to determine that but looking into it.
Tried strace but I wasn't sure what to look for in the deluge of info.


> Do you mean that the sound from arecord gets garbled?

Correct : playing back the file just produced (arecord -f S16_LE -c 2 -r 44100 arec_44k.wav),
sound is normal until I started audacity, then the rest of the audio is 10x accelerated.

> arecord, is it over pulseaudio (with alsa-lib pulse plugin)?

Probably ? alsa-lib is installed and pulseaudio running normally, and I just gave default options to arecord.


> No, I mean the way to trigger without audacity

I understand. I haven't found a simpler way (yet).


Thanks,
Chris

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

* realtek ALC1220 : recording samplerate 10x too slow
@ 2022-03-21 22:06 fenugrec
  0 siblings, 0 replies; 6+ messages in thread
From: fenugrec @ 2022-03-21 22:06 UTC (permalink / raw)
  To: alsa-devel

[resent from the correct email address. Sorry !]

Hi,
I was redirected here by pulseaudio maintainers for an issue I thought was at that layer :
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1344

After a fresh reboot, arecord / parecord work fine, and the level meters in pavucontrol react normally.
If I start audacity, the card gets in a state where the level meters become sluggish, and recording either drops 90% of samples, or records approximately 10x too fast.
Playback is always ok, unaffected.

I cannot fix that state other than by a reboot. The obvious "closing audacity", restarting the pulseaudio daemon, have no effect.
Tried kernels 5.15.24 and a recent 5.17; same problem.

I posted some detailed debugging info on that pulseaudio issue tracker, as well as pastebinned alsa-info.sh output here:
http://alsa-project.org/db/?f=7ee784003379252acfef25de5fecbdfd559fe342

The problematic hardware is Card 1, Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller [1022:1457].

Test command :
pasuspender -- arecord -D hw:1,0 -f S16_LE -c 2 -r 44100 arec_pasusp.wav

Here's an example recording of me saying 'test' :
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/uploads/5a51081fcd55ecd705df258c1a0fd2b6/arec_44k.wav

I have no ~/.asoundrc or related files.

Anything I can try to narrow down the cause of this ?


Thanks!
Chris

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

end of thread, other threads:[~2022-03-23 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 22:01 realtek ALC1220 : recording samplerate 10x too slow cblondin
2022-03-22 15:26 ` Takashi Iwai
2022-03-23  0:49   ` fenugrec
2022-03-23  9:34     ` Takashi Iwai
2022-03-21 22:06 fenugrec
2022-03-23 15:12 fenugrec

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.