Page 6 of 7

Re: ALSA on Raspbian

Posted: Tue Aug 28, 2012 8:27 pm
by helander
Hi omenie,

it sounds like you got something to work?
Could you describe what it is that works and how you made it work?
I tried to find out by tracing in this thread, but I probably got lost ;).

Thanks

Lars

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 7:31 am
by av2kk
I have been having the following problem for some time and am unable to get a solution so far.
The USB sound card (C-media vid 0x0d8c pid 0x000e) is detected correctly at boot time. The command
aplay -D plughw:1,0 welcome.wav
gives an error
aplay: set_hw_params(1145): unable to install hw params:
and returns without playing the file.

However if I remove the USB sound card and reinsert it while the power is on,the same command above works OK and plays the file.
The .wav files I am playing are 16KHz 16 bit stereo files.
Is this problem related to ALSA or USB detection?

My OS Debian Wheezy 16-7-2012 .
Thanks for any help

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 7:52 am
by kadamski
So the problem only occur after rebooting RaspberryPI, right?

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 8:18 am
by av2kk
Exactly. It works fine after reinserting the USB sound card.
This problem is preventing me from going ahead with my project which requires that my application should run unattended. I am stuck with this problem for the last 2 weeks.

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 8:30 am
by kadamski
I believe it's not ALSA nor USB detection problem. It seems to me that the card have problem with resetting itself when RPi is rebooted. I may be wrong at this but it may require power cycle when rebooting the system to properly initialize and I believe it is not happening on RPi unless you do full power cycle reboot on it.

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 9:41 am
by av2kk
@kadamski. Now that you have given me some lead , I will try and cycle the power to the USB sound card through a relay operated from GPIO after boot. I will also try to get hold of some other sound card and see if it behaves the same way. Thank you for your prompt response.

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 10:01 am
by kadamski
Keep in mind that It's just a suggestion and I don't really know if my assumptions about rebooting are correct.

Re: ALSA on Raspbian

Posted: Wed Sep 12, 2012 10:12 pm
by Licaon_Kter
even with dwc_otg.fiq_fix_enable=1 added in your /boot/cmdline.txt ?

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 3:03 am
by av2kk
Licaon_Kter wrote:even with dwc_otg.fiq_fix_enable=1 added in your /boot/cmdline.txt ?
Yes. I tried adding this line but the problem remains. Should I rpi-update before trying this?
(I am working with linux for the first time !)

I tried commenting out the snd_bcm2835 line in /etc/modules and did
sudo modprobe snd_bcm2895
after boot but the problem remains the same.

I am giving below the screen shots after boot and after disconnecting and reconnecting the power wire to the USB sound card. ( I made an extender cable with usb plug/socket to do this)

Code: Select all

=====================================================================
boot time with USB sound card in place:
====================================================================
[email protected] ~/Desktop/hello_pi/LOADS2000/16A_49M $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 4, If 1, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 4, If 2, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 4, If 3, Class=HID, Driver=cm109, 12M
        |__ Port 3: Dev 5, If 0, Class=hub, Driver=hub/4p, 12M
            |__ Port 4: Dev 7, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 4: Dev 7, If 1, Class=HID, Driver=usbhid, 1.5M

[email protected] ~/Desktop/hello_pi/LOADS2000/16A_49M $ aplay -D plughw:1,0 NSECIL.wav 
Playing WAVE 'NSECIL.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
aplay: set_params:1145: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 16000
PERIOD_TIME: 125000
PERIOD_SIZE: 2000
PERIOD_BYTES: 4000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: NONE
BUFFER_BYTES: 16000
TICK_TIME: 0
(wav file not played)

=====================================================================
After removing and reapplying power to the USB sound card:
=====================================================================
[email protected] ~/Desktop/hello_pi/LOADS2000/16A_49M $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 2: Dev 9, If 0, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 9, If 1, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 9, If 2, Class=audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 9, If 3, Class=HID, Driver=cm109, 12M
        |__ Port 3: Dev 5, If 0, Class=hub, Driver=hub/4p, 12M
            |__ Port 4: Dev 7, If 0, Class=HID, Driver=usbhid, 1.5M
            |__ Port 4: Dev 7, If 1, Class=HID, Driver=usbhid, 1.5M
[email protected] ~/Desktop/hello_pi/LOADS2000/16A_49M $ aplay -D plughw:1,0 NSECIL.wav 
Playing WAVE 'NSECIL.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
(the wav file is played OK)


[email protected] ~/Desktop/hello_pi/LOADS2000/16A_49M $ uname -a
Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l GNU/Linux



Ofcourse now I have a work around with the relay option but love to have a clean (software only) solution.
I will try and scope the power input to the USB sound card at boot time today and see if it is too slow to initialize the sound card as kadamski suggested.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 5:32 am
by av2kk
Update:
I monitored the supply to the USB card during power up and found it raise to 5V in 10ms as clean ramp. I feel this should be good enough to initialize the card?
I took a dump of system messages using dmesg and here it is:

Code: Select all

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.1.9+ ([email protected]) (gcc version 4.5.1 (Broadcom-2708) ) #168 PREEMPT Sat Jul 14 18:56:31 BST 2012
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c05f7c4c, node_mem_map c06c8000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: dma.dmachans=0x3c bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0x2 bcm2708.serial=0x4e0efa59 smsc95xx.macaddr=B8:27:EB:0E:FA:59 dwc_otg.lpm_enable=0  console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB = 128MB total
[    0.000000] Memory: 122956k/122956k available, 8116k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xc8800000 - 0xd8000000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05943d0   (5681 kB)
[    0.000000]       .init : 0xc0595000 - 0xc05c7000   ( 200 kB)
[    0.000000]       .data : 0xc05c8000 - 0xc05f93b8   ( 197 kB)
[    0.000000]        .bss : 0xc05f93dc - 0xc06c7504   ( 825 kB)
[    0.000000] NR_IRQS:245
[    0.000000] timer_set_mode: unhandled mode:1
[    0.000000] timer_set_mode: unhandled mode:3
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    3.290519] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    3.349494] pid_max: default: 32768 minimum: 301
[    3.350123] Mount-cache hash table entries: 512
[    3.350786] Initializing cgroup subsys cpuacct
[    3.350903] Initializing cgroup subsys devices
[    3.350954] Initializing cgroup subsys freezer
[    3.350999] Initializing cgroup subsys blkio
[    3.351115] CPU: Testing write buffer coherency: ok
[    3.351244] ftrace: allocating 14801 entries in 44 pages
[    3.424314] hw perfevents: enabled with v6 PMU driver, 3 counters available
[    3.426330] devtmpfs: initialized
[    3.434127] NET: Registered protocol family 16
[    3.436075] vc-mem: mm_vc_mem_phys_addr = 0x00000000
[    3.436146] vc-mem: mm_vc_mem_size      = 0x10000000 (256 MiB)
[    3.436681] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    3.436757] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    3.436806] mailbox: Broadcom VideoCore Mailbox driver
[    3.436920] bcm2708_vcio: mailbox at f200b880
[    3.437028] bcm_power: Broadcom power driver
[    3.437076] bcm_power_open() -> 0
[    3.437108] bcm_power_request(0, 8)
[    3.937805] bcm_mailbox_read -> 00000080, 0
[    3.937854] bcm_power_request -> 0
[    3.937886] Serial: AMBA PL011 UART driver
[    3.938079] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[    3.960276] bio: create slab <bio-0> at 0
[    3.961770] SCSI subsystem initialized
[    3.962084] usbcore: registered new interface driver usbfs
[    3.962275] usbcore: registered new interface driver hub
[    3.962641] usbcore: registered new device driver usb
[    3.963675] Switching to clocksource stc
[    3.964560] Switched to NOHz mode on CPU #0
[    3.978465] FS-Cache: Loaded
[    3.978902] CacheFiles: Loaded
[    3.997540] NET: Registered protocol family 2
[    3.998158] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    3.999769] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    4.000025] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    4.000163] TCP: Hash tables configured (established 4096 bind 4096)
[    4.000210] TCP reno registered
[    4.000249] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    4.000322] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    4.000849] NET: Registered protocol family 1
[    4.001880] RPC: Registered named UNIX socket transport module.
[    4.001955] RPC: Registered udp transport module.
[    4.001994] RPC: Registered tcp transport module.
[    4.002030] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    4.002404] bcm2708_dma: DMA manager at c8808000
[    4.002567] bcm2708_gpio: bcm2708_gpio_probe c05d00e0
[    4.003142] vc-mem: Videocore memory driver
[    4.004238] audit: initializing netlink socket (disabled)
[    4.004359] type=2000 audit(0.640:1): initialized
[    4.110075] VFS: Disk quotas dquot_6.5.2
[    4.110388] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    4.111789] FS-Cache: Netfs 'nfs' registered for caching
[    4.113152] msgmni has been set to 240
[    4.116013] io scheduler noop registered
[    4.116086] io scheduler deadline registered (default)
[    4.116329] io scheduler cfq registered
[    4.116654] BCM2708FB: registering framebuffer (1824x[email protected])
[    4.117517] bcm2708_fb_set_par info(c78e9400) 1824x984 (1824x984), 0, 16
[    4.137133] BCM2708FB: start = c8c00000,49385000 width=1824, height=984, bpp=16, pitch=3648 size=3618816 success=0
[    4.164122] Console: switching to colour frame buffer device 228x61
[    4.189191] BCM2708FB: register framebuffer (0)
[    4.202718] brd: module loaded
[    4.209536] loop: module loaded
[    4.210716] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[    4.211179] vcos: [1]: vchiq_init_state: called
[    4.212179] vcos: [1]: vchiq: initialised - version 2 (min 2), device 253.0
[    4.213136] usbcore: registered new interface driver smsc95xx
[    4.213438] cdc_ncm: 04-Aug-2011
[    4.213874] usbcore: registered new interface driver cdc_ncm
[    4.214099] dwc_otg: version 2.90b 6-MAY-2010 (platform bus)
[    4.214761] Core Release: 2.80a
[    4.214944] Setting default values for core params
[    4.215161] Finished setting default values for core params
[    4.215726] c8840008 -> 1
[    4.416144] Using Buffer DMA mode
[    4.416303] Periodic Transfer Interrupt Enhancement - disabled
[    4.416482] Multiprocessor Interrupt Enhancement - disabled
[    4.416755] dwc_otg bcm2708_usb: DWC OTG Controller
[    4.417009] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    4.417326] dwc_otg bcm2708_usb: irq 75, io mem 0x00000000
[    4.417560] Init: Port Power? op_state=1
[    4.417694] Init: Power Port (0)
[    4.417964] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    4.418191] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.425136] usb usb1: Product: DWC OTG Controller
[    4.432190] usb usb1: Manufacturer: Linux 3.1.9+ dwc_otg_hcd
[    4.439176] usb usb1: SerialNumber: bcm2708_usb
[    4.447583] hub 1-0:1.0: USB hub found
[    4.454669] hub 1-0:1.0: 1 port detected
[    4.462434] Module dwc_common_port init
[    4.462868] usbcore: registered new interface driver uas
[    4.469900] Initializing USB Mass Storage driver...
[    4.477048] usbcore: registered new interface driver usb-storage
[    4.484071] USB Mass Storage support registered.
[    4.491116] usbcore: registered new interface driver libusual
[    4.498731] mousedev: PS/2 mouse device common for all mice
[    4.505631] cpuidle: using governor ladder
[    4.512558] cpuidle: using governor menu
[    4.519723] sdhci: Secure Digital Host Controller Interface driver
[    4.526673] sdhci: Copyright(c) Pierre Ossman
[    4.534002] bcm_power_open() -> 1
[    4.541097] Registered led device: mmc0::
[    4.541652] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    4.549110] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    4.556423] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.565103] Registered led device: led0
[    4.565623] usbcore: registered new interface driver usbhid
[    4.572521] usbhid: USB HID core driver
[    4.581438] TCP cubic registered
[    4.588491] Initializing XFRM netlink socket
[    4.597780] NET: Registered protocol family 17
[    4.610046] Registering the dns_resolver key type
[    4.617393] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    4.634721] Waiting for root device /dev/mmcblk0p2...
[    4.692348] mmc0: problem reading SD Status register.
[    4.721981] mmc0: new SDHC card at address e624
[    4.733094] mmcblk0: mmc0:e624 SD16G 14.8 GiB 
[    4.745633]  mmcblk0: p1 p2
[    4.843840] usb 1-1: new high speed USB device number 2 using dwc_otg
[    4.887951] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.903923] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.912368] Freeing init memory: 200K
[    5.074409] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    5.082625] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.091129] hub 1-1:1.0: USB hub found
[    5.099524] hub 1-1:1.0: 3 ports detected
[    5.384046] usb 1-1.1: new high speed USB device number 3 using dwc_otg
[    5.504541] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    5.511723] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.524274] smsc95xx v1.0.4
[    5.599824] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:0e:fa:59
[    5.704190] usb 1-1.2: new full speed USB device number 4 using dwc_otg
[    5.825488] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=000e
[    5.833131] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    5.849442] usb 1-1.2: Product: Generic USB Audio Device   
[    5.964147] usb 1-1.3: new full speed USB device number 5 using dwc_otg
[    6.096487] usb 1-1.3: New USB device found, idVendor=05e3, idProduct=0606
[    6.104446] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.112077] usb 1-1.3: Product: USB Hub 2.0
[    6.120788] usb 1-1.3: Manufacturer: ALCOR
[    6.129812] hub 1-1.3:1.0: USB hub found
[    6.137718] hub 1-1.3:1.0: 4 ports detected
[    6.424199] usb 1-1.3.1: new low speed USB device number 6 using dwc_otg
[    6.549806] usb 1-1.3.1: New USB device found, idVendor=0e8f, idProduct=0022
[    6.557485] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.572948] usb 1-1.3.1: Product: USB KB V11
[    6.580834] usb 1-1.3.1: Manufacturer: GASIA
[    6.608936] input: GASIA USB KB V11 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1:1.0/input/input0
[    6.631100] generic-usb 0003:0E8F:0022.0001: input: USB HID v1.10 Keyboard [GASIA USB KB V11] on usb-bcm2708_usb-1.3.1/input0
[    6.655128] input: GASIA USB KB V11 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1:1.1/input/input1
[    6.663376] generic-usb 0003:0E8F:0022.0002: input: USB HID v1.10 Device [GASIA USB KB V11] on usb-bcm2708_usb-1.3.1/input1
[    6.764210] usb 1-1.3.4: new low speed USB device number 7 using dwc_otg
[    6.879164] usb 1-1.3.4: New USB device found, idVendor=045e, idProduct=00cb
[    6.893957] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.902271] usb 1-1.3.4: Product: Microsoft Basic Optical Mouse v2.0 
[    6.933967] usb 1-1.3.4: Manufacturer: Microsoft 
[    6.959289] input: Microsoft  Microsoft Basic Optical Mouse v2.0  as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.0/input/input2
[    6.981592] generic-usb 0003:045E:00CB.0003: input: USB HID v1.11 Mouse [Microsoft  Microsoft Basic Optical Mouse v2.0 ] on usb-bcm2708_usb-1.3.4/input0
[    8.672517] cm109: Keymap for Komunikate KIP1000 phone loaded
[    8.817588] input: CM109 USB driver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.3/input/input3
[    8.891820] usbcore: registered new interface driver cm109
[    9.006206] cm109: CM109 phone driver: 20080805 (C) Alfred E. Heggestad
[   11.051911] usbcore: registered new interface driver snd-usb-audio
[   14.491373] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   14.698735] ### snd_bcm2835_alsa_probe c05d07a0 ############### PROBING FOR bcm2835 ALSA device (0):(1) ###############
[   14.708116] Creating card...
[   14.717768] Creating device/chip ..
[   14.727539] Adding controls ..
[   14.736662] Registering card ....
[   14.754338] bcm2835 ALSA CARD CREATED!
[   14.772726] ### BCM2835 ALSA driver init OK ### 
[   26.769185] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS
[   35.404373] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   40.404139] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[   45.404369] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   50.404230] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[   55.404507] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   60.404396] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[   65.404653] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   70.404548] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[   76.404692] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   81.405079] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[   86.404881] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[   91.405427] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[   96.405026] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  101.405385] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  106.405136] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  111.405494] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  117.405573] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  122.405390] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  127.405683] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  132.405547] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  137.405862] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  142.405712] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  147.406035] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  152.405897] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  158.405978] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  163.406290] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  168.406155] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  173.406462] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  177.006271] 4:1:1: usb_set_interface failed
[  178.406304] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  183.406618] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  188.406457] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  193.406758] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  199.406891] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[email protected] ~/Desktop/hello_pi/LOADS2000_stereo/16A_49M_stereo/INSIDE $ 


=================================================================================
dmesg after reconnecting USB sound card
=================================================================================
[  204.406715] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  209.407033] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  214.409785] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  219.407210] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  224.407035] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  229.407337] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  234.407193] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  240.407290] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  245.407604] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  250.407455] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  255.407756] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  260.407680] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  265.407909] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  270.407879] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  275.408179] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  281.408172] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  286.408034] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  291.408338] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  296.408189] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  301.408605] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  306.408473] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  311.408430] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  316.408626] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  322.408774] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  327.408680] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  332.408752] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  337.408931] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  342.409120] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  347.409109] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  352.409190] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  357.409292] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  363.409364] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  368.409435] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  373.409528] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  378.409668] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  383.409688] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  388.409670] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  393.409825] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  398.409897] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  404.409990] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  409.409998] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  414.410163] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  419.410157] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  424.410300] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  429.410354] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  434.410473] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  439.410591] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000118
[  445.410574] smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114
[  450.410656] smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000114
[  453.293957] cm109: cm109_urb_irq_callback: urb status -71
[  453.294162] cm109: cm109_urb_ctl_callback: urb status -32
[  453.294204] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[  453.294216] 
[  453.294231] INFO:: schedule_periodic: No host channel available for periodic transfer.
[  453.294243] 
[  453.294262] ERROR::dwc_otg_hcd_urb_enqueue:518: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[  453.294276] 
[  453.294294] cm109: cm109_urb_ctl_callback: usb_submit_urb (urb_irq) failed -4008
[  453.306796] usb 1-1.2: USB disconnect, device number 4
[  453.314865] cm109: cm109_toggle_buzzer_sync: usb_control_msg() failed -19
[  470.181089] usb 1-1.2: new full speed USB device number 8 using dwc_otg
[  470.282617] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=000e
[  470.282653] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  470.282677] usb 1-1.2: Product: Generic USB Audio Device   
[  470.299380] input: CM109 USB driver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.3/input/input4
[  470.299676] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[  470.299693] 
[  470.299710] INFO:: schedule_periodic: No host channel available for periodic transfer.
[  470.299722] 
[  470.299743] ERROR::dwc_otg_hcd_urb_enqueue:518: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[  470.299756] 
[  470.299775] cm109: cm109_urb_ctl_callback: usb_submit_urb (urb_irq) failed -4008
[  471.226841] usb 1-1.2: USB disconnect, device number 8
[  471.234910] cm109: cm109_toggle_buzzer_sync: usb_control_msg() failed -19
[  471.471085] usb 1-1.2: new full speed USB device number 9 using dwc_otg
[  471.572605] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=000e
[  471.572650] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[  471.572673] usb 1-1.2: Product: Generic USB Audio Device   
[  471.585249] input: CM109 USB driver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.3/input/input5
[  471.585574] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[  471.585590] 
[  471.585606] INFO:: schedule_periodic: No host channel available for periodic transfer.
[  471.585619] 
[  471.585639] ERROR::dwc_otg_hcd_urb_enqueue:518: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[  471.585652] 
[  471.585672] cm109: cm109_urb_ctl_callback: usb_submit_urb (urb_irq) failed -4008
[email protected] ~/Desktop/hello_pi/LOADS2000_stereo/16A_49M_stereo/INSIDE $ 

Here there is an error at the end of boot:
[ 177.006271] 4:1:1: usb_set_interface failed
Does it indicate anything?
From the dump above I observed that the USB sound card is detected BEFORE alsa drivers are installed.
(When I reconnect the device number is 8 and then it changes to 9. This is probably because I am connecting two wires manually and there could be a short disconnection in the process.)

When I reconnect the sound card the alsa drivers are already there. Does this explain the problem?
Is there any way to rerun the dwc_otg after boot up?

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 6:16 am
by kadamski
It shouldn't matter if ALSA is already loaded or not when USB device is detected. And if I understand your situation correctly, the card works OK without unplugging after full power cycle, right?

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 7:08 am
by adambialas
I have the same problem with USB microphone PS3 EYE , i can't record audio using snd-usb-audio module if I unplug and plug again . And I have to re plug usb cam to enable recording after make reboot of raspberry pi.
After normal boot ,. everything is looking ok , the microphone is on the list arecord -l , but i can't record anything .

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 7:53 am
by Licaon_Kter
av2kk wrote:
Licaon_Kter wrote:even with dwc_otg.fiq_fix_enable=1 added in your /boot/cmdline.txt ?
Yes. I tried adding this line but the problem remains. Should I rpi-update before trying this?
(I am working with linux for the first time !)
YES, always test with the latest version
either:
sudo rpi-update ( if you have it )
or
sudo apt-get update
sudo apt-get upgrade
Also, that option only works on the latest kernel 3.2.27, and I don't think you have it, run a uname -a

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 9:00 am
by av2kk
kadamski wrote:It shouldn't matter if ALSA is already loaded or not when USB device is detected. And if I understand your situation correctly, the card works OK without unplugging after full power cycle, right?
No. The USB sound card works only when I physically remove(unplug) it from the usb socket ( I am using the top socket) and reinsert it after powering the raspberry pi. To simulate the above in my project I am using a relay which gives power to the USB sound card after the initial boot sequence. Since I did not want to tamper with the PCB I made an extention cable with plug and socket on either side and looped the power line through the relay NO contact.

@Licaon_Kter uname -a shows
Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l GNU/Linux
I pressume I cannot use that option with this version. I will try the new version on another PI .
By the way the fiq update seems to reduce the number of interrupts and improve the speed by 10%. Does it really address my problem?

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 9:11 am
by kadamski
Ok so I didn't understand you at first. Could you test this when everything except soundcard is disconnected from USB (including USB hub)? Ideally, you should use SSH for this. But if this is a problem, you can try connecting keyboard after everything has finished booting.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 9:28 am
by av2kk
kadamski wrote:Ok so I didn't understand you at first. Could you test this when everything except soundcard is disconnected from USB (including USB hub)? Ideally, you should use SSH for this. But if this is a problem, you can try connecting keyboard after everything has finished booting.
I did that. But the problem remains.
I connected the USB sound card to the bottom slot ,kept the top slot free. I have only the HDMI monitor connected, nothing else. I switched on power , waited for boot to complete and plugged the top slot with a USB unpowered hub to which keyboard and mouse are connected. aplay does not play the .wav file.
Now with the power still connected I unplugged the USB sound card and plugged it back. Now aplay works fine.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 9:38 am
by kadamski
First, try it without hub. And also check if you are having similar error messages in dmesg when no other USB devices are connected. You could repost your dmesg output here in this scenario. Please connect only keyboard, without USB hub and test everything in such configuration, before starting X server.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 11:50 am
by av2kk
Good news. With only the sound card and the keyboard aplay works OK first time.
Here is dmesg

Code: Select all

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.1.9+ ([email protected]) (gcc version 4.5.1 (Broadcom-2708) ) #168 PREEMPT Sat Jul 14 18:56:31 BST 2012
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 49152
[    0.000000] free_area_init_node: node 0, pgdat c05f7c4c, node_mem_map c06c8000
[    0.000000]   Normal zone: 384 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 48768 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 48768
[    0.000000] Kernel command line: dma.dmachans=0x3c bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0x2 bcm2708.serial=0x34af687c smsc95xx.macaddr=B8:27:EB:AF:68:7C dwc_otg.lpm_enable=0  console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 192MB = 192MB total
[    0.000000] Memory: 187880k/187880k available, 8728k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xcc800000 - 0xd8000000   ( 184 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xcc000000   ( 192 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05943d0   (5681 kB)
[    0.000000]       .init : 0xc0595000 - 0xc05c7000   ( 200 kB)
[    0.000000]       .data : 0xc05c8000 - 0xc05f93b8   ( 197 kB)
[    0.000000]        .bss : 0xc05f93dc - 0xc06c7504   ( 825 kB)
[    0.000000] NR_IRQS:245
[    0.000000] timer_set_mode: unhandled mode:1
[    0.000000] timer_set_mode: unhandled mode:3
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    3.397698] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    3.456674] pid_max: default: 32768 minimum: 301
[    3.457309] Mount-cache hash table entries: 512
[    3.457974] Initializing cgroup subsys cpuacct
[    3.458092] Initializing cgroup subsys devices
[    3.458142] Initializing cgroup subsys freezer
[    3.458186] Initializing cgroup subsys blkio
[    3.458306] CPU: Testing write buffer coherency: ok
[    3.458441] ftrace: allocating 14801 entries in 44 pages
[    3.531485] hw perfevents: enabled with v6 PMU driver, 3 counters available
[    3.533481] devtmpfs: initialized
[    3.541266] NET: Registered protocol family 16
[    3.543197] vc-mem: mm_vc_mem_phys_addr = 0x00000000
[    3.543264] vc-mem: mm_vc_mem_size      = 0x10000000 (256 MiB)
[    3.543786] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    3.543859] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    3.543906] mailbox: Broadcom VideoCore Mailbox driver
[    3.544020] bcm2708_vcio: mailbox at f200b880
[    3.544131] bcm_power: Broadcom power driver
[    3.544178] bcm_power_open() -> 0
[    3.544210] bcm_power_request(0, 8)
[    4.044905] bcm_mailbox_read -> 00000080, 0
[    4.044954] bcm_power_request -> 0
[    4.044987] Serial: AMBA PL011 UART driver
[    4.045183] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[    4.067358] bio: create slab <bio-0> at 0
[    4.068841] SCSI subsystem initialized
[    4.069149] usbcore: registered new interface driver usbfs
[    4.069341] usbcore: registered new interface driver hub
[    4.069715] usbcore: registered new device driver usb
[    4.070746] Switching to clocksource stc
[    4.071725] Switched to NOHz mode on CPU #0
[    4.085463] FS-Cache: Loaded
[    4.085903] CacheFiles: Loaded
[    4.104455] NET: Registered protocol family 2
[    4.105070] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    4.106694] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    4.107127] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    4.107353] TCP: Hash tables configured (established 8192 bind 8192)
[    4.107400] TCP reno registered
[    4.107441] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    4.107515] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    4.108095] NET: Registered protocol family 1
[    4.109127] RPC: Registered named UNIX socket transport module.
[    4.109201] RPC: Registered udp transport module.
[    4.109241] RPC: Registered tcp transport module.
[    4.109277] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    4.109664] bcm2708_dma: DMA manager at cc808000
[    4.109827] bcm2708_gpio: bcm2708_gpio_probe c05d00e0
[    4.110400] vc-mem: Videocore memory driver
[    4.111443] audit: initializing netlink socket (disabled)
[    4.111563] type=2000 audit(0.640:1): initialized
[    4.219647] VFS: Disk quotas dquot_6.5.2
[    4.219955] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    4.221557] FS-Cache: Netfs 'nfs' registered for caching
[    4.222921] msgmni has been set to 366
[    4.225585] io scheduler noop registered
[    4.225658] io scheduler deadline registered (default)
[    4.225901] io scheduler cfq registered
[    4.226224] BCM2708FB: registering framebuffer ([email protected])
[    4.227090] bcm2708_fb_set_par info(cb8ec400) 1824x984 (1824x984), 0, 16
[    4.233007] BCM2708FB: start = ccc00000,4d385000 width=1824, height=984, bpp=16, pitch=3648 size=3618816 success=0
[    4.259573] Console: switching to colour frame buffer device 228x61
[    4.284465] BCM2708FB: register framebuffer (0)
[    4.297802] brd: module loaded
[    4.304462] loop: module loaded
[    4.305594] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[    4.306046] vcos: [1]: vchiq_init_state: called
[    4.307032] vcos: [1]: vchiq: initialised - version 2 (min 2), device 253.0
[    4.307992] usbcore: registered new interface driver smsc95xx
[    4.308295] cdc_ncm: 04-Aug-2011
[    4.308593] usbcore: registered new interface driver cdc_ncm
[    4.308800] dwc_otg: version 2.90b 6-MAY-2010 (platform bus)
[    4.309454] Core Release: 2.80a
[    4.309636] Setting default values for core params
[    4.309854] Finished setting default values for core params
[    4.310414] cc840008 -> 1
[    4.510967] Using Buffer DMA mode
[    4.511125] Periodic Transfer Interrupt Enhancement - disabled
[    4.511302] Multiprocessor Interrupt Enhancement - disabled
[    4.511569] dwc_otg bcm2708_usb: DWC OTG Controller
[    4.511815] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    4.512125] dwc_otg bcm2708_usb: irq 75, io mem 0x00000000
[    4.512350] Init: Port Power? op_state=1
[    4.512482] Init: Power Port (0)
[    4.512747] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    4.512971] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.519727] usb usb1: Product: DWC OTG Controller
[    4.526744] usb usb1: Manufacturer: Linux 3.1.9+ dwc_otg_hcd
[    4.533702] usb usb1: SerialNumber: bcm2708_usb
[    4.541913] hub 1-0:1.0: USB hub found
[    4.548828] hub 1-0:1.0: 1 port detected
[    4.556478] Module dwc_common_port init
[    4.556903] usbcore: registered new interface driver uas
[    4.563873] Initializing USB Mass Storage driver...
[    4.570947] usbcore: registered new interface driver usb-storage
[    4.577761] USB Mass Storage support registered.
[    4.584833] usbcore: registered new interface driver libusual
[    4.592304] mousedev: PS/2 mouse device common for all mice
[    4.599064] cpuidle: using governor ladder
[    4.605882] cpuidle: using governor menu
[    4.612926] sdhci: Secure Digital Host Controller Interface driver
[    4.619691] sdhci: Copyright(c) Pierre Ossman
[    4.626977] bcm_power_open() -> 1
[    4.634076] Registered led device: mmc0::
[    4.634589] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    4.641910] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    4.648946] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.656403] Registered led device: led0
[    4.656905] usbcore: registered new interface driver usbhid
[    4.665067] usbhid: USB HID core driver
[    4.673738] TCP cubic registered
[    4.680633] Initializing XFRM netlink socket
[    4.687646] NET: Registered protocol family 17
[    4.696890] Registering the dns_resolver key type
[    4.709145] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    4.726490] Waiting for root device /dev/mmcblk0p2...
[    4.789415] mmc0: problem reading SD Status register.
[    4.808957] mmc0: new SDHC card at address e624
[    4.829720] mmcblk0: mmc0:e624 SD08G 7.40 GiB 
[    4.842064]  mmcblk0: p1 p2
[    4.940914] usb 1-1: new high speed USB device number 2 using dwc_otg
[    5.151461] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    5.158366] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.166496] hub 1-1:1.0: USB hub found
[    5.173647] hub 1-1:1.0: 3 ports detected
[    5.461077] usb 1-1.1: new high speed USB device number 3 using dwc_otg
[    5.581476] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    5.588219] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.602983] smsc95xx v1.0.4
[    5.610566] EXT4-fs (mmcblk0p2): recovery complete
[    5.621590] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    5.628617] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    5.637171] Freeing init memory: 200K
[    5.687419] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:af:68:7c
[    5.791102] usb 1-1.2: new full speed USB device number 4 using dwc_otg
[    5.912553] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=000e
[    5.920717] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    5.928112] usb 1-1.2: Product: Generic USB Audio Device   
[    6.031227] usb 1-1.3: new low speed USB device number 5 using dwc_otg
[    6.156323] usb 1-1.3: New USB device found, idVendor=0e8f, idProduct=0022
[    6.156364] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.156382] usb 1-1.3: Product: USB KB V11
[    6.156394] usb 1-1.3: Manufacturer: GASIA
[    6.163747] input: GASIA USB KB V11 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
[    6.163887] generic-usb 0003:0E8F:0022.0001: input: USB HID v1.10 Keyboard [GASIA USB KB V11] on usb-bcm2708_usb-1.3/input0
[    6.221860] input: GASIA USB KB V11 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1/input/input1
[    6.229830] generic-usb 0003:0E8F:0022.0002: input: USB HID v1.10 Device [GASIA USB KB V11] on usb-bcm2708_usb-1.3/input1
[    9.027384] cm109: Keymap for Komunikate KIP1000 phone loaded
[    9.130552] input: CM109 USB driver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.3/input/input2
[    9.211931] usbcore: registered new interface driver cm109
[    9.220086] cm109: CM109 phone driver: 20080805 (C) Alfred E. Heggestad
[   11.373929] usbcore: registered new interface driver snd-usb-audio
[   15.434857] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   15.642941] ### snd_bcm2835_alsa_probe c05d07a0 ############### PROBING FOR bcm2835 ALSA device (0):(1) ###############
[   15.651647] Creating card...
[   15.660282] Creating device/chip ..
[   15.669630] Adding controls ..
[   15.678327] Registering card ....
[   15.697096] bcm2835 ALSA CARD CREATED!
[   15.714630] ### BCM2835 ALSA driver init OK ### 
[   27.638209] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS
So is the problem with the hub? I am using Zebronics 4port usb hub.

I highly appreciate your help. Let me put back the auto login feature and try the aplication without the hub/mouse once again. I will give you feed back tomorrow.

One more observation: I put back the hub with keyboard and mouse and reboot. The problem is there. Then I removed the mouse from the hub. Now the problem is gone! What is happening?

One question: when I put back the configuration to autologin and direct it to Desktop and boot it with only keyboard and sound card, how can I get the command window using the keyboard? Sorry to ask this silly question as I am a newbie to linux.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 12:08 pm
by kadamski
Well, not really HUB problem but RPi USB stack. Using other HUB may (or may not) help, however.

Re: ALSA on Raspbian

Posted: Thu Sep 13, 2012 12:31 pm
by av2kk
@kadamski Thanks for all the help. I'll try and go on from here.

Re: ALSA on Raspbian

Posted: Fri Sep 14, 2012 10:44 am
by GeekTeacher
Hi, another newbie to Linux, ALSA and Pi here. I'm trying to run the Espeak text-to-voice synth under Raspian and get the ALSA errors shown below. I've tried to follow the threads on this forum to sort the problem, but I'm now totally confused - could someone please help? I've included my aplay settings at the top. Thanks.

Code: Select all

[email protected] ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
[email protected] ~ $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
[email protected] ~ $ espeak hello
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
wave_open_sound > Pa_OpenStream : err=-9996 (Invalid device)
[email protected] ~ $ 
It's probably a simple solution for someone by now, but my mind is boggled on this!

Re: ALSA on Raspbian

Posted: Fri Sep 14, 2012 10:57 am
by kadamski
Do you have PulseAudio installed? Do you have any .asound.conf or /etc/asound.conf files?

Re: ALSA on Raspbian

Posted: Fri Sep 14, 2012 11:09 am
by GeekTeacher
If PulseAudio is not installed in the default image, I've not got it - should I install it?

There was no /etc/asound.conf file at first, and I've tried making one from the info in these forums - but it doesn't seem to help. Is a reboot necessary every time you make a change? Having said that, it hasn't made a difference anyway. What should my asound.conf contain please?

Re: ALSA on Raspbian

Posted: Fri Sep 14, 2012 11:14 am
by kadamski
No, don't install PulseAudio, it makes more problems than it solves on RPi. It would be the best not to have any asound.conf file at start. Every change in this file is working next time you start some application using ALSA, no need for reboot.

Re: ALSA on Raspbian

Posted: Fri Sep 14, 2012 11:23 am
by GeekTeacher
@kadamski

Many thanks for your help - I appreciate it. Have you any other suggestions for why I get the error messages with ALSA then please?

Apart from using Espeak, I'm trying to read the input from a USB mike too. I've got some Python code to do this, but I get similar ALSA errors about unknown PCM cards and no Jack Server. I think it's all down to my basic ALSA configuration, which will be the default supplied on the latest Raspian image once I've deleted the asound.conf file I've been messing with.

Any further help welcome.