ppiotr69
Posts: 21
Joined: Thu Jul 10, 2014 7:55 pm

[solved] no sound from easycap aka stk1160

Thu Jul 10, 2014 9:25 pm

Dear community
my first post after weeks of anonymous browsing, great forum, great people and the Pi

I gave up and now I'm looking for your support. Any idea and assistance is very much appreciated.

tl;dr version:
arecord does not record any sound from easycap (stk1160) on RPI 2.0 with kernel 3.12
None of these works for me:
#arecord -D plughw:1,0 -f S16_LE -r 48000 | aplay -D plughw:0,0 -f S16_LE -r 48000
Result: no sound on headphone

#arecord -D plughw:1,0 -d 10 -f dat -r 48000 test.wav
Result: empty 44 bytes wav file with error message arecord: pcm_read:1801: read error: Input/output error:

#arecord -D plughw:1,0 -d 10 -f dat -r 48000 test.wav
Result: infinite loop and empty file:

Has anyone recorded a sound sample from the easycap video grabber? If yes how?
Pls. share with me any hint - thank you!

Details:
RPI 2.0 + easycap on Linux raspberrypi 3.12.22+ #691

root@raspberrypi:~# arecord -Ll
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Controlle
USB 2.0 Video Capture Controlle, USB Audio
Default Audio Device
sysdefault:CARD=Controlle
USB 2.0 Video Capture Controlle, USB Audio
Default Audio Device
front:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
Front speakers
surround40:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Controlle,DEV=0
USB 2.0 Video Capture Controlle, USB Audio
IEC958 (S/PDIF) Digital Audio Output
**** List of CAPTURE Hardware Devices ****
card 1: Controlle [USB 2.0 Video Capture Controlle], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

#------------
root@raspberrypi:~# dmesg
[ 4711.599487] usb 1-1.3: USB disconnect, device number 6
[ 4711.599732] stk1160: freeing 0 urb buffers...
[ 4711.599747] stk1160: all urb buffers freed
[ 4711.600067] stk1160: releasing all resources
[ 4717.719360] usb 1-1.3: new high-speed USB device number 7 using dwc_otg
[ 4717.820392] usb 1-1.3: New USB device found, idVendor=05e1, idProduct=0408
[ 4717.820427] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4717.820445] usb 1-1.3: Product: USB 2.0 Video Capture Controller
[ 4717.820462] usb 1-1.3: Manufacturer: Syntek Semiconductor
[ 4717.824527] usb 1-1.3: New device Syntek Semiconductor USB 2.0 Video Capture Controller @ 480 Mbps (05e1:0408, interface 0, class 0)
[ 4717.824559] usb 1-1.3: video interface 0 found
[ 4718.521942] saa7115 2-0025: saa7113 found @ 0x4a (stk1160)
[ 4719.830179] stk1160: driver ver 0.9.5 successfully loaded
[ 4719.929182] stk1160: registers to NTSC like standard
[ 4720.090380] stk1160 1-1.3:1.0: V4L2 device registered as video0

# ---------------------
root@raspberrypi:~# cat /proc/asound/cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [Controlle ]: USB-Audio - USB 2.0 Video Capture Controlle
Syntek Semiconductor USB 2.0 Video Capture Controlle at usb-bcm2708_usb-1.3, hi

# ---------------------
root@raspberrypi:~# amixer -c 1 contents
numid=1,iface=MIXER,name='Digital In Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

# ---------------------
root@raspberrypi:~# amixer -c 1
Simple mixer control 'Digital In',0
Capabilities: cswitch cswitch-joined penum
Capture channels: Mono
Mono: Capture [on]


Audio jack works, tested with speaker-test -D plughw:0,0
I try to record some sound with following commands:

# First try:
root@raspberrypi:~# arecord -D plughw:1,0 -f S16_LE -r 48000 | aplay -D plughw:0,0 -f S16_LE -r 48000
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

#Results: no sound in headphone !!!

#Second:
root@raspberrypi:~# arecord -d 5 -D plughw:1,0 -f S16_LE -r 48000 test.s16
Recording WAVE 'test.s16' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

# although I use -d 5 it does not stop after 5 seconds ???? What does it mean
# after ctrl-c the test.s16 file is empty (only 44 bytes):
-rw-r--r-- 1 root root 44 Jul 10 20:49 test.s16

#Third try:
arecord -D plughw:1,0 -d 10 -f dat -r 48000 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:1801: read error: Input/output error

#another "funny" thing:
root@raspberrypi:~# arecord -D plughw:1,0 -d 10 -f S16_LE -r 48000 test.wav
# runs in a infinity loop and has to be stoped with ctrl-c


many regards
Peter
Last edited by ppiotr69 on Sat Jul 12, 2014 2:43 pm, edited 1 time in total.

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: no sound from easycap aka stk1160

Fri Jul 11, 2014 11:23 am

It's been a while since I played around with a stk1160 using the Pi but have you checked the mute status of the device?

Check Mute status
v4l2-ctl -C mute

Switch Mute off
v4l2-ctl -c mute=0

Edit: Just checked and the stk1160 driver doesn't have a mute control. I was thinking of an em28xx

ppiotr69
Posts: 21
Joined: Thu Jul 10, 2014 7:55 pm

Re: no sound from easycap aka stk1160

Fri Jul 11, 2014 11:55 am

hi, thank you for considering my issue.

yes I checked the mute status:

root@raspberrypi:~/sbin# amixer -c 1
Simple mixer control 'Digital In',0
Capabilities: cswitch cswitch-joined penum
Capture channels: Mono
Mono: Capture [on]

And I can switch it on/off from the alsamixer.
It really looks like that I have to somehow unmute it, but in RPI there is no stk1160-mixer and therefore I cannot use:
amixer -c stk1160mixer sset Line unmute cap

here i have from amixer only these controls
root@raspberrypi:~# amixer -c1 scontents
Simple mixer control 'Digital In',0
Capabilities: cswitch cswitch-joined penum
Capture channels: Mono
Mono: Capture [on]

any other idea?
kr
- Peter

ppiotr69
Posts: 21
Joined: Thu Jul 10, 2014 7:55 pm

[workaround] no sound from easycap aka stk1160

Fri Jul 11, 2014 10:39 pm

I'm replaying to myself to feed google. Maybe someone can reuse this.
I think that there is something wrong with the new stk1160 module, which has replaced easycap available in kernel 3.6.

Downgrade to 3.6 solved my issue. I can record some sound samples.
Unfortunately the recorded sound quality is noticeable worse as recorded with the new stk1160 on a regular notebook.

kr
- Peter

ppiotr69
Posts: 21
Joined: Thu Jul 10, 2014 7:55 pm

Re: no sound from easycap aka stk1160

Sat Jul 12, 2014 2:42 pm

Developer of stk1160 module Ezequiel helped me to sort it out.
Solution:
check the kernel configuration:
#
# Analog TV USB devices
#
[snip]
CONFIG_VIDEO_STK1160_COMMON=m
# CONFIG_VIDEO_STK1160_AC97 is not set
CONFIG_VIDEO_STK1160=m

and change the parameter # CONFIG_VIDEO_STK1160_AC97 to
CONFIG_VIDEO_STK1160_AC97=y
rebuild and install new kernel.
After the reboot new sound card appears and we can unmute the line with the command:
amixer -c stk1160mixer sset Line unmute cap
and voilà you can record with easycap under linux > 3.6

solved - thank you Ezequiel!

Return to “General discussion”