You are not logged in.
Hello friends.
I'm having a nightmarish relationship with my usb soundcard on various linux distributions from the day i started to use linux. After getting pops, clicks, soundcard not starting until i unplug it and plug it in again, system starting internal soundcards instead of the usb one (even when i set it as the main one) etc. I am now faced with a new challange it seems.
When i try to play csound file, it gives me an error saying that:
unable to set requested sample format on soundcard
When i try to play the speaker-test -c 2, it says:
sample format not avaivable for playback
This all happend after i created a .asoundrc file, which (it seems) fixes the issue of the system randomly picking which card it likes to boot, but now i'm unable to play anything.
Does anyone have any hints?
Last edited by NotaName (2014-09-16 17:50:57)
Offline
You forgot to post that ~/.asoundrc. The preferred method to set up the default sound card is through modprobe options as described on arch linux alsa wiki*. Is the usb card plugged in the whole time? If so, you could just set:
$ cat /etc/modprobe.d/50-alsa.conf
options snd-usb-audio index=0 # add here vid= and pid= you get from 'lsusb'What format are those applications trying to set? Could post the output of alsacap?
Edit: The vid and pid are still mentioned for other modules, but I am working on changing that soon.
Last edited by emeres (2014-09-16 19:39:20)
Offline
You forgot to post that ~/.asoundrc. The preferred method to set up the default sound card is through modprobe options as described on arch linux alsa wiki*. Is the usb card plugged in the whole time? If so, you could just set:
$ cat /etc/modprobe.d/50-alsa.conf options snd-usb-audio index=0 # add here vid= and pid= you get from 'lsusb'What format are those applications trying to set? Could post the output of alsacap?
Edit: The vid and pid are still mentioned for other modules, but I am working on changing that soon.
Hi
I'm currently not at home, but my .asoundrc is the same as the one in arch linux wiki on alsa, i just replaced the word audio with USB, since that is what cat gave me. I'm also using the alsa-base settings, but it doesn't seem to work everytime.
As for the applications, it doesn't matter if I use 44100, 48000, or any other sample rate, it gives the same output.
Sorry for the half-a** response. I will post more details when i will get back from work.
Offline
[...] my .asoundrc is the same as the one in arch linux wiki on alsa, i just replaced the word audio with USB, since that is what cat gave me. I'm also using the alsa-base settings, but it doesn't seem to work everytime.
As for the applications, it doesn't matter if I use 44100, 48000, or any other sample rate, it gives the same output.
That does not make any sense: ~/.asoundrc holds alsa configuration, /etc/modprobe.d/50-alsa.conf or similar holds modprobe configuration. There is no need for ~/.asoundrc, as of this point. Is the usb sound cardconstantly plugged in? The sample rate matters for quality.
Edit: Please post your ~/.asoundrc and modprobe configuration files, maybe I misunderstood it.
Last edited by emeres (2014-09-17 10:48:40)
Offline
NotaName wrote:[...] my .asoundrc is the same as the one in arch linux wiki on alsa, i just replaced the word audio with USB, since that is what cat gave me. I'm also using the alsa-base settings, but it doesn't seem to work everytime.
As for the applications, it doesn't matter if I use 44100, 48000, or any other sample rate, it gives the same output.
That does not make any sense: ~/.asoundrc holds alsa configuration, /etc/modprobe.d/50-alsa.conf or similar holds modprobe configuration. There is no need for ~/.asoundrc, as of this point. Is the usb sound cardconstantly plugged in? The sample rate matters for quality.
Edit: Please post your ~/.asoundrc and modprobe configuration files, maybe I misunderstood it.
First my settings.
-----------------------------------------------------------------------------------------------------------------
1) .asoundrc file:
pcm.!default{
type hw
card USB
}
ctl.!default{
type hw
card USB
}2) alsa-base.conf file:
options snd-usb-audio index=-13) output of :
$ cat /proc/asound/card*/id
NVidia
USB4) output of:
aplay -l
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevices #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevices #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevices #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevices #0: subdevice #05) out put of:
lspci -nn | grep -i audio
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)--------------------------------------------------------------------------------------------------------------------------------
I have a Scarllet 2i2 usb audio card and have disabled the motherboard audio card in the bios, however i have no idea what this NIVIDIA GK107 is.
My usb card doesn't start when i boot the computer, so i have to manually unplug the usb connection and plug it back in again. This has been the case on almost all linux distributions i tried, i think only in fedora it booted with the computer once or twice. However after initial boot if i only restart the computer, i don't have to unplug and plug the sound card again, it's only when i turn off the computer and turn it on again.
My usb card loaded up fine with the alsa-base conf for dozen of times, but all of a sudden it refuses to load as the default card and in alsamixer i get that NVIDIA thing as my default card, which i can't change. Because of that, i created a .asoundrc file, which makes the system load my usb card as the primary device, however, then i cannot play or do anything with audio, as the system is unable to control it. When i was talking about output, i meant the error outputs, not the sound, as there is no sound output (i understand what sample rate does, it just doesn't matter if i set it to 44100, 48000, or 96000, the errors still say, that the programs cannot set the sample rate).
As for /etc/modprobe.d/50-alsa.conf - i have no such file in my system. And i cannot set it as you proposed, since "lspci -nn | grep -i audio" only shows the output of that NVidia thing.
P.S. sorry for the late response rate, as i just got back from a 24 hour shift and thank you for your answers.
Last edited by NotaName (2014-09-18 10:11:43)
Offline
Use [code]output[/code] tags to mark output of a command or scripts and correct your previous post. Is this a laptop or a desktop? So there is no other sound card like an integral one that you disabled under BIOS/UEFI?
index - index (slot #) of sound card
- Values: 0 through 31 or negative
- If nonnegative, assign that index number
- if negative, interpret as a bitmask of permissible
indices; the first free permitted index is assigned
- Default: -1
So the "-1" is redundant at best. For setting the usb card ad default and the nvidia hdmi as secondary use:
options snd-usb-audio index=0
options snd-hda-intel index=1Post also the output of 'lsusb', so that the vid and pid can be determined. Instead of that limiting ~/.asoundrc you could also simply use the defaults.pcm node:
$ cat ~/.asoundrc
defaults.pcm.card "USB";
defaults.ctl.card "USB";The format error results most probably, because of lack of plug pcm plugin in between the source and USB. You address the hardware directly, so no conversions are made.
Offline
So the "-1" is redundant at best. For setting the usb card ad default and the nvidia hdmi as secondary use:options snd-usb-audio index=0 options snd-hda-intel index=1
This did the trick..... However, i don't know if it's just a strange timing, but after changing the alsa-base.conf file with with the proposed settings and restarting the pc, now i cannot login anymore. This is what i get:
hid-generic 0003:1A2C:0021.0002: usb_submit_urb(ctrl) failed: -1
hid-generic 0003:1A2C:0021.0002: timeout initializing reports
input : USB USB Keyboard as /device/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.1/0003:1A2C:0021.0002/input/input7
hid-generic 0003:1A2C:0021.0002: input,hidraw1: USB HID v1.10 Device [USB USB Keyboard] on usb-0000:00:14.0-4/input1
Arch Linux 3.16.2-1-ARCH (tty1)
localhost login:
[36.328611] systemd-journal[143]: File /var/log/journal/"many numbers and letters that i don't want to type"/user-1000.journal corrupted or uncleanly shut down, renaming and replacingThe output consists of much more than that, but i'm not that fast of a typist, so i took the last lines.
I am running pure tty without a front end, when i enter my username and password, nothing happens, it just stays there. I can write on the empty space, but i cannot interact with the system whatsoever.
Hm... Can enter the file system by booting through a usb arch linux?
Actually, after waiting a few minutes i can login, but i still get the long boot log , only without the corruption part. Hm, strange.
Last edited by NotaName (2014-09-18 10:40:55)
Offline
Well, after another restart, this has gotten pretty weird. It seems i don't have alsa in my system, neither the confs, neither the alsamixer tool, neither can i get any sound. After i loged in, it was alright i had sound and everything, then after another restart i don't have alsa anymore, and there were no boot logs or error messages....
What the hell is going on
?
Last edited by NotaName (2014-09-18 11:15:34)
Offline
Could it be that the partition is getting full, where logs are stored? The journal might need flushing or you may want to delete the corrupt journals manually. Boot a live cd and chroot into your partition.
Offline
Could it be that the partition is getting full, where logs are stored? The journal might need flushing or you may want to delete the corrupt journals manually. Boot a live cd and chroot into your partition.
Well, i do have another error which i posted in another topic, but nobody really responded, so i gave up on it:
systemd-tmpfiles-setup.service failure
Failded to start create volatile files and directoriesAs for the sound card, i was too heisty, alsa is fine, however i needed to delete the options snd-hda-intel index=1 part. May there be a chance that i was a fool and copied this, instead of thinking about it as a placeholder where i need to put my information?
Last edited by NotaName (2014-09-18 11:11:07)
Offline
Link that thread here. Those options need to be in a conf file inside /etc/modprobe.d/ directory. No other audio related options should be there. Check the logs for hda, alsa, audio and sound:
dmesg | egrep -i 'alsa|audio|hda|sound'I will respond later.
Offline
Link that thread here.
https://bbs.archlinux.org/viewtopic.php?id=187042
When i used "systemctl status" command on systemd-tmpfiles-setup.service for the first time, i got:
dbus-daemon[185] Unknown username "polkitd" in message bus configuration file
dbus-daemon[185] Unknown username "colord" in message bus configuration fileand there were more, but for some reason i cannot see them in the log. When i use the same command now, it just sats failed without any details.
The
Failded to start create volatile files and directoriesand a couple of other messages about something "failed to mount something" are only visible at a quick glimpse when the computer is booting, i cannot locate them in the log.
Those options need to be in a conf file inside /etc/modprobe.d/ directory. No other audio related options should be there. Check the logs for hda, alsa, audio and sound:
dmesg | egrep -i 'alsa|audio|hda|sound'
snd_hda_intel 0000:01:00.1 Disabling MSI
snd_hda_intel 0000:01:00.1 Handle VGA-switcheroo audio client
input: HDA NVidia HDMI/DP, pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input7
input: HDA NVidia HDMI/DP, pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input8
input: HDA NVidia HDMI/DP, pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input9I will respond later.
Thank you for your time!
Offline
Should your usb card be recognized, it should be set as card 0. Since like you mentioned this appear not to be the case, that might have some implications, although Alsa should work fine with other cards. I would test it one more time, replug the usb card. 'aplay -l' should list both cards. If you have no success, use the defaults node instead, so delete those modprobe options, but remember that this is only for Alsa. Pulseaudio and anything else will have to be set up separately.
I see you also have issues with a hard disk drive. Continue those other threads, this one seems to be at its end.
Offline
Ok, thanks for the help, i will figure it out eventually.
Offline
You are welcome. Update your other threads with relevant information, eventually someone will respond. I mentioned this, since those issues could be related. The hdd might through its malfunction corrupt the journal or maybe other parts of the system as well. When the system runs as expected, report back. Either modprobe options or defaults node should work and set your card as default considering the above. Should you then consider this issue solved, please mark the thread as such.
Offline