[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sound starts only sometimes after boot



Hi Anhony,

My .asoundrc:
pcm.snd_card {
        type hw
        card 1
}

pcm.dmixer {
        type dmix
        ipc_key 1024
        slave.pcm "snd_card"
        slave {
                period_size 256
                buffer_size 2048
                rate 44100
        }
}

pcm.dsnooper {
        type dsnoop
        ipc_key 2048
        slave.pcm "snd_card"

        slave {
                period_size 256
                buffer_size 2048
                rate 44100
        }
}

pcm.duplex {
        type asym
        playback.pcm "dmixer"
        capture.pcm "dsnooper"
}

pcm.!default {
        type plug
        slave.pcm "duplex"
}

And my script whos change the default card:
$ crontab -l | grep sound
@reboot  ~/scripts/sound_card_fix
$ cat ~/scripts/sound_card_fix:
sed -i '/[[:space:]]card .$/s/.$/'"$(cat /proc/asound/cards |
					grep USB |
					awk '/USB/ {
					print $1
					exit
					}')"'/' .asoundrc

I hope this help you

On Fri, Nov 21, 2008 at 9:40 AM, Anthony Campbell <ac@acampbell.org.uk> wrote:
> On 20 Nov 2008, Javier Barroso wrote:
>> Hi Anthony,
>> On Thu, Nov 20, 2008 at 3:05 PM, Anthony Campbell <ac@acampbell.org.uk> wrote:
>> ...
>> > The modules loaded seem to be the same whether sound works or not. I
>> > get:
>> >
>> > snd_pcm_oss            41760  0
>> > snd_mixer_oss          18816  1 snd_pcm_oss
>> > snd_ens1371            27328  2
>> > snd_usb_audio          91296  0
>>
>> I'm not sure if smb_usb_audio is loaded too if you haven't got a usb sound card.
>>
>> But, if you have 2 sounds cards (one usb), perhaps alsa is changing
>> the order of the cards:
>>
>> cat /proc/asound/cards
>>
>> I had to make a script to change my default card on my .asoundrc file
>> because alsa recognized my usb sound card like first sound card one
>> time and like second sound card another times. I know should be a udev
>> rule for that but I don't know how write it yet.
>>
>> If it is not your case, sorry for the noise.
>
> Thanks for this; yes, you may well be right. I get:
>
> arcadia:~:$ cat /proc/asound/cards
>  0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
>                      Ensoniq AudioPCI ENS1371 at 0xdc00, irq 17
>  1 [U0x46d0x8ad    ]: USB-Audio - USB Device 0x46d:0x8ad
>                      USB Device 0x46d:0x8ad at usb-0000:00:0f.1-2, full speed
>
>
> I want to use the first of these. I don't know anything about asound and
> I don't have .asoundrc.  Could you kindly post your file here in case I
> could use it as a template?
>
>
> Anthony
>
> --
> Anthony Campbell - ac@acampbell.org.uk
> Microsoft-free zone - Using Debian GNU/Linux
> http://www.acampbell.org.uk (blog, book reviews,
> and sceptical articles)
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


Reply to: