From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-user+bounces-54040-garchives=archives.gentoo.org@gentoo.org>) id 1GelrM-0001oW-Ul for garchives@archives.gentoo.org; Tue, 31 Oct 2006 05:08:25 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9V56OQj014396; Tue, 31 Oct 2006 05:06:24 GMT Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k9V54OJS024483 for <gentoo-user@lists.gentoo.org>; Tue, 31 Oct 2006 05:04:24 GMT Received: by nf-out-0910.google.com with SMTP id p46so223299nfa for <gentoo-user@lists.gentoo.org>; Mon, 30 Oct 2006 21:04:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FR1GX2Q6SYz3/8BbEbY86r4F+uPN7zTskuVRCn4ITGWXOzTPTeO3pWDzvZFP1Sln/e/pDfO5ZPf5oRwRxpEN/pLUNmvuaRT1zWves0PFV+mWzCy9LYDSbl484URXMSEkRz+eN1dwEBe1Y4j2qp6GgrfQ22XPX5Q7B41tF9tkCaw= Received: by 10.82.142.9 with SMTP id p9mr969936bud; Mon, 30 Oct 2006 21:04:23 -0800 (PST) Received: by 10.82.98.1 with HTTP; Mon, 30 Oct 2006 21:04:23 -0800 (PST) Message-ID: <5bc4c4570610302104y7fa6264bla3f434735f32a5e7@mail.gmail.com> Date: Tue, 31 Oct 2006 02:04:23 -0300 From: "Leandro Melo de Sales" <leandroal@gmail.com> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] (SOLVED) Usb sound and ALSA Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Archives-Salt: f806fa4b-5b68-49db-8333-51a59cc72f4a X-Archives-Hash: 9c4e4ee738343660666f97870ce79ea6 Hi... just to document. There are two options: 1) I created ~/.asoundrc file (as suggested by Richard) but with some modification as shown next (I don't know if all this option is necessary, but the sound is perfect): ----- ~/.asoundrc pcm.card0 { type hw card 1 } pcm.!default { type plug slave.pcm "dmixer" } pcm.!output { type dmix ipc_key 1024 ipc_key_add_uid 1 slave { pcm "card0" period_time 0 period_size 1024 buffer_size 8192 rate 192000 } bindings { 0 0 1 1 } } pcm.!input { type dsnoop ipc_key 28889 ipc_key_add_uid 1 slave { pcm "card0" channels 2 period_time 0 period_size 1024 rate 192000 } pcm.!duplex { type asym playback.pcm "output" capture.pcm "input" } pcm.!default { type plug slave.pcm "duplex" } pcm.dsp0 { type plug slave.pcm "duplex" } ctl.mixer0 { type hw card 0 } pcm.jackplug { type plug slave { pcm "jack" } } pcm.jack { type jack playback_ports { 0 alsa_pcm:playback_1 1 alsa_pcm:playback_2 } capture_ports { 0 alsa_pcm:capture_1 1 alsa_pcm:capture_2 } } 2) change alsa configuration module to put my card1 to card0 and card0 to card1 (don't forget to restart alsa daemon): ------ /etc/modules.d/alsa alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss alias snd-card-0 snd-usb-audio alias sound-slot-0 snd-usb-audio alias snd-card-1 snd-intel8x0 alias sound-slot-1 snd-intel8x0 options snd-usb-audio index=0 options snd-intel8x0 index=1 ------------------------------------ ... snd-intel8x0 is the module alias for my internal sound card and snd-usb-audio for my external usb audio device. BTW, thanks Richard. []s Leandro. -- Leandro Melo de Sales. Computer Science MSc Candidate Distributed System Lab - lsd.ufcg.edu.br Pervasive Computing Lab - embedded.ufcg.edu.br Federal University of Campina Grande - UFCG 083 33101404 (extension 208) 2006/10/31, Leandro Melo de Sales <leandroal@gmail.com>: > Hi, > > After I click on Apply button the Alsa Device Configuration section > become enabled, but when I specify hw1,0 in Stereo text field and play > a song amarok shows the message: "Audio output unavailable; the device > is busy.". > > /proc/asound/ # ls > ASM5X0 Modem card1 cards hwdep oss seq version > ICH6 card0 card2 devices modules pcm timers > > the file ASM5X0 is a symbolic link to card2. > > /proc/asound/ # cat cards > 0 [ICH6 ]: ICH4 - Intel ICH6 > Intel ICH6 with unknown codec at 0xc8000800, irq 18 > 1 [Modem ]: ICH-MODEM - Intel ICH6 Modem > Intel ICH6 Modem at 0x3400, irq 18 > 2 [ASM5X0 ]: USB-Audio - AS-M5X0 > Gradiente AS-M5X0 at usb-0000:00:1d.1-1, full speed > > I also tried to specify hw2,0 but the message is the same, device is busy! :( > > But a good news is that if I do: > > mpg123 -a /dev/sound/dsp1 music.mp3 > > ... the file is played on my usb device perfectly!!! So, this is the > proof that kernel recognize the device and I just don't know how > switch alsa default device do /dev/sound/dsp1. > > Any clue? Thank you, > > Leandro. > > 2006/10/31, Leandro Melo de Sales <leandroal@gmail.com>: > > Hi... The device is configured and I type cat xxx > /dev/sound/dsp1 > > and I got an strange sound, but this prove that the device was > > recognized by the kernel. I also can control volume of the second > > audio device through alsamixer. The question is: how can I specify (on > > alsa) that the default device is /dev/sound/dsp1 or something like > > that? > > I tried to do what you said on Amarok, but the "Alsa Device > > Configuration" section is disabled, why? > > > > []s > > Leandro. > > > > 2006/10/31, Richard Fish <bigfish@asmallpond.org>: > > > On 10/30/06, Leandro Melo de Sales <leandroal@gmail.com> wrote: > > > > Hi list... > > > > > > > > I have an usb sound system from Gradiente company (an eletronic > > > > device factory) and I plugged it on my system. dmesg command shows > > > > this: > > > > > > > > input: Gradiente AS-M5X0 as /class/input/input3 > > > > input: USB HID v1.00 Device [Gradiente AS-M5X0] on usb-0000:00:1d.1-1 > > > > > > > > But when I play a mp3 media the sound is not forwarded to my usb > > > > device, instand, the sound is still played through my integrated > > > > laptop device. > > > > On windows I use it without problem. So, what do I have to do to > > > > forward the sound to my usb device? > > > > > > Probably windows is disabling any existing sound card or at least > > > making the USB the "default" sound device. Unfortunately there is no > > > equivalent with alsa currently. > > > > > > So assuming that you've got the alsa drivers loaded for this device > > > (/proc/asound/cards should contain two entries), you can usually > > > specify alsa device as "hw1,0". The exact method for doing this > > > depends on what app you are using. For example on amarok with the > > > xine it is under Configure Amarok... -> Engine -> ALSA Device > > > Configuration. If you enter hw1,0 for Stereo there, then 2 channel > > > audio should be played on the first pcm of the second sound card. > > > > > > You should also be able to do this with a .asoundrc file, with an entry like: > > > > > > pcm.default { > > > type hw > > > card 1 > > > device 1 > > > } > > > > > > The above is really primitive, without any dmix plugin (software > > > mixing), so only one app could use the device at a time unless it does > > > hardware mixing. Mostly this is just to give you an idea of where to > > > look! ;-) > > > > > > -Richard > > > -- > > > gentoo-user@gentoo.org mailing list > > > > > > > -- gentoo-user@gentoo.org mailing list