Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autojack using pyalsaaudio interface which is "broken by design" #86

Open
oe1rsa opened this issue Jun 10, 2023 · 1 comment
Open

autojack using pyalsaaudio interface which is "broken by design" #86

oe1rsa opened this issue Jun 10, 2023 · 1 comment

Comments

@oe1rsa
Copy link

oe1rsa commented Jun 10, 2023

setting rates of alsa devices not working

Ubuntu version I am using: 22-04 LTS

I am trying to use rate 48000 for a USB soundcard. However the rate stays at 44100, no matter what.

I have tried to find out why and can see, that in autojack a PCM device is opened and AFTER-wards the rate is set. The author of pyalsalsaaudio has discovered that this approach will not work and has moved the parameters to the constructor of the PCM
class. See this issue.

Consequently, even if the pyalsaaudio would be updated to a newer version, autojack still would suffer from the problem because it needs to be rewritten to use the constuctor parameters.

Unfortunately I cannot see a work-around since it seems not to be possible to set a default rate for devices in say asoundrc.

@oe1rsa oe1rsa changed the title autojack using pyalsasudio interface which is "broken by design" autojack using pyalsaaudio interface which is "broken by design" Jun 10, 2023
@oe1rsa
Copy link
Author

oe1rsa commented Jun 11, 2023

Ok, answering my opened issue, in case someone else stumbles over the same problem:

  1. The main "problem" obviously has already been fixed in a later version, because pyalsaaudio is not used with PCM devices any more.

  2. My root problem, which I have not reported in the first place because I was not aware of it was a different one: The libzita-alsa-pcmi has a bug in Ubuntu 22.04 LTS, causing bad float format handling. You can read about this here. The result was a completely over driven microphone despite its gain was set to minimum.

Now, if I set my USB card to 44100 the system is usable, although, of course, I would prefer to set the USB card to 48000.
The "work around" is to compile a newer version of the libzita-alsa-pcmi and link it to the system lib as described in the above mentioned thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant