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

Set options after initialization doesn't work #46

Closed
ghost opened this issue Jan 20, 2018 · 1 comment
Closed

Set options after initialization doesn't work #46

ghost opened this issue Jan 20, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 20, 2018

After the initialization:

out = alsaaudio.PCM(alsaaudio.PCM_PLAYBACK, device=device)

Setting an option:

out.setrate(44100)

Ends in an error:

out.setrate(44100) 
alsaaudio.ALSAAudioError: Device or resource busy [default]

Without setting an option the device can be used and everything works as expected.
Python version doesn't matter, currently using it on an raspberry pi b+ with alsa. ALSA info below.

Maybe the options should be set on the alsaaudio.PCM()?

Cheers

!!################################
!!ALSA Information Script v 0.4.64
!!################################

!!Script ran on: Sat Jan 20 13:43:10 UTC 2018


!!Linux Distribution
!!------------------

Arch Linux \r (\l) NAME="Arch Linux ARM" ID=archarm ID_LIKE=arch PRETTY_NAME="Arch Linux ARM" HOME_URL="http://archlinuxarm.org/" SUPPORT_URL="https://archlinuxarm.org/forum" BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"


!!DMI Information
!!---------------

Manufacturer:
Product Name:
Product Version:
Firmware Version:
Board Vendor:
Board Name:


!!ACPI Device Status Information
!!---------------



!!Kernel Information
!!------------------

Kernel release:    4.9.77-1-ARCH
Operating System:  GNU/Linux
Architecture:      armv6l
Processor:         unknown
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     k4.9.77-1-ARCH
Library version:    1.1.5
Utilities version:  1.1.5


!!Loaded ALSA modules
!!-------------------

snd_soc_justboom_dac


!!Sound Servers on this system
!!----------------------------

Jack:
      Installed - Yes (/usr/bin/jackd)
      Running - No


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [sndrpijustboomd]: JustBoomDac - snd_rpi_justboom_dac
                      snd_rpi_justboom_dac


!!PCI Soundcards installed in the system
!!--------------------------------------



!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------



!!Loaded sound module options
!!---------------------------

!!Module: snd_soc_justboom_dac
        * :


!!ALSA Device nodes
!!-----------------

crw-rw---- 1 root audio 116,  0 Jan 20 11:29 /dev/snd/controlC0
crw-rw---- 1 root audio 116, 16 Jan 20 11:29 /dev/snd/pcmC0D0p
crw-rw---- 1 root audio 116,  1 Jan 15 22:20 /dev/snd/seq
crw-rw---- 1 root audio 116, 33 Jan 15 22:20 /dev/snd/timer


/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root  60 Jan 20 11:29 .
drwxr-xr-x 3 root root 140 Jan 20 11:29 ..
lrwxrwxrwx 1 root root  12 Jan 20 11:29 platform-soc:sound -> ../controlC0


!!ALSA configuration files
!!------------------------

!!System wide config file (/etc/asound.conf)

pcm_slave.test {
    pcm default
}

pcm.softvol {
    type plug
    slave test
}


pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw
    card 0
}

!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpijustboomd [snd_rpi_justboom_dac], device 0: JustBoom DAC HiFi pcm512x-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****


@larsimmisch
Copy link
Owner

larsimmisch commented Jul 13, 2020

Closed via #63

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

No branches or pull requests

1 participant