I have a laptop running Ubuntu 18.04 and i3wm connected via Thunderbolt to a dock and a webcam. I want that the default pulse audio sink is set to the laptops internal sound card.
Thus I have
set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
set-default-source alsa_input.pci-0000_00_1f.3.analog-stereo
in /etc/pulse/default.pa .
This does not work, the default sink is set to the dock and the default source to the webcam after boot. Pulse audio informs me that
[pulseaudio] main.c: Source alsa_input.pci-0000_00_1f.3.analog-stereo does not exist.
[pulseaudio] main.c: Sink alsa_output.pci-0000_00_1f.3.analog-stereo does not exist.
Restarting pulse audio after boot sets the default source and sink to laptops internal audio card as specified in the config.
How can I debug this problem?
Related
I am working with Linux software on DE10-nano board and I need to perform a small modification to default FPGA configuration (add pull-ups on GPIO lines).
The user manual points to DE10-Nano System CD\Demonstrations\FPGA\Default as default project which suppose to produce the factory FPGA configuration.
I compile it, convert SOF to RBF, and put the RBF on SD card for U-Boot to load.
U-Boot programs FPGA (I get orange LED on) and then fails to load Linux device tree (I get ERROR: Did not find a cmdline Flattened Device Tree message via COM port) although the same device tree file is in the same place on SD card.
Am I using the correct Quartus project?
The only solution that worked for me (loading my own .rbf file with the unmodified Linux Angrstrom from Terasic) was to use the SD card images from:
http://download.terasic.com/downloads/cd-rom/de10-nano/linux_BSP/
I used the de10_nano_linux_console image. I used the sof_to_rbf.bat file to generate the .rbf file, ensuring that compression was turned on and the output file name was soc_system.rbf.
Any other method I tried with the SD card resulted in the error message the OP posted relating to the Device Tree.
Context
I have accidentally uploaded some ARM Cortex M0-cmis files (core-cmFunc.h and core_cmInstr.h) to the STM32F407VG discovery board. After I noticed my mistake, I tried to undo it by changing my code and upload it again... but it said it couldn't make connection.
What I already tried
I've tried to get passed the USART interface of the discovery board by uploading the code directly on the ARM Coretex M4 chip via the bootloader. I connected BOOT0 to VDD and PB2(=BOOT1) to GND so the chip starts up in the Pattern1-mode. Then I connected PA9(=Tx) and PA10(=Rx) to an USB to TTL cable (by the use of a RS-232 chip in the cable) and reset the device. I started the "Flash Loader Demonstrator" from ST to make connection with the board (I've done this before and it worked). But that didn't made connection either.
Extra information
The Windows filemanager "sees" the ARM Cortex M4 file when it gets connected to the PC;
Led LD7 emits green light when the board is powered;
Led LD1 emits red light;
Does someone knows how I can factory-reset the flashmemmory of the STM32F4 so it acts at it should again?
After some trial and error I've come to the conclusion that I accidentally activated the OTG_VBUS with my code. I couldn't upload another code because that bus was active on PA9(TX of USART2). It seems that the VBUS was held active, even in bootloader mode.
PA9 connected to VBUS
The solution to this problem was the use of another bootloader interface, I used USART3 on PB10/11, but you could also use PC10/11. After I uploaded a dummy code in that manner, I
was able to upload codes with the Coocox-IDE again.
Other Bootloader interfaces
I need some pointers where to start with the following:
From any application that plays audio using ALSA to the connected speaker I'd like to grab the samples and do some audio processing.
I am not in control of the player and I'd like to be able to process the audio from any source. Basically it will be an UV-meter, perhaps later with FFT (all just on the command line). Additionally I'd like my app to be self-contained.
In my research I've found:
There is a loopback kernel module.
You can do fancy stuff with the configuration file.
There is the ability to create plugins.
Using the kernel module and altering the configuration file introduces some dependencies of my application to the configuration of the system.
And creating a plugin I give up control over the app and cannot start/terminate it whenever I want.
This is not satisfactory to me so I'd like to know if there is a way to either:
create a loopback device programmatically
or is there any other way to read from the pcm playback device other applications are writing to.
You can use the pulseaudio for linux where you can very easily create a loopback device .There ia a pactl command -it will help you create a null sink and you can loopback from it .
something like this
//this would create a null sink with specified channel conf
pactl load-module module-null-sink sink_name=sink6ch format=s16le rate=48000 channels=6 channel_map=front-left,front-right,front-center,lfe,rear-left,rear-right
//make it default
pactl set-default-sink sink6ch
you can use its monitor device to read about the monitor devices of pulse audio
Development platform: TI davinci processor with Linux OS
I am developing C program which receives user command over serial port and does the corresponding task. Basic task is to start and stop the video recording. And for retrieving the video to host pc from the embedded device, usb interface is used.
The partition used for storing the video file is loaded as USB gadget mass storage device using following kernel module for the user to save the video on host pc.
modprobe g_file_storage file=/root/usbstorage
But i want to load(or some otherway) this kernel module from the c function whenever user send a command to connect the embedded device to host. And disconnect whenever disconnect command is received.
As of now I'm able to load this module only from the shell.
Could any suggest any possible way of doing this from within the c-program.
It seems I don't understand the ALSA architecture, even after reading most of the documentation on offer:
I list all the available ALSA devices using snd_device_name_hint() and snd_device_name_get_hint(). This lists, among others "pulse" under hwdep class so it looks like PulseAudio is available in my system. But when I try to open it with snd_pcm_open() (non-blocking mode and either in or out) I get "No such file or directory".
What gives? I can open other devices, for instance the in-built Intel chip works fine, why doesn't PulseAudio?
Is pulseaudio running with the alsa emulation plugin loaded before you try to open the pulse device? If I understand how asoundrc files work you can create virtual alsa devices from the config file (which is how a pulse device gets created) which will exist whether the backend for that virtual device is running or not.