saa7134_alsa module won't unload

Getting your soundcard to work, using Debian on non-i386 hardware, etc

saa7134_alsa module won't unload

Postby igsNomad » 2016-01-15 15:21


I have a hard time unloading a module (that is it's more stubborn than an aging leprechaun) that is being reported as not being used by lsmod:
Code: Select all
root@groot:~# modprobe -vr saa7134_alsa
modprobe: FATAL: Module saa7134_alsa is in use.
root@groot:~# lsmod | grep saa
saa7134_alsa           17686  0
saa7134               174878  1 saa7134_alsa
tveeprom               20593  1 saa7134
videobuf2_dma_sg       12655  1 saa7134
videobuf2_core         47787  1 saa7134
rc_core                22404  1 saa7134
v4l2_common            12995  3 tuner,saa7134,videobuf2_core
videodev              126451  4 tuner,saa7134,v4l2_common,videobuf2_core
snd_pcm                88662  7 snd_soc_rt5640,snd_soc_core,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller,saa7134_alsa
snd                    65244  23 snd_hda_codec_realtek,snd_soc_core,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_compress,saa7134_alsa
i2c_core               46012  12 drm,snd_soc_rt5640,i2c_hid,tuner,i2c_designware_platform,saa7134,regmap_i2c,nvidia,v4l2_common,tveeprom,tuner_simple,videodev

Why I would need such an outlandish thing is that after I was forced to do a system reinstall thus losing my previous conf files I've been trying to reinstall my saa7134 tvcard. Normally i2c should handle the problem but it won't detect it. So I have a nice little script I found and modified to find the correct card although it is a bit tedious to run:
Code: Select all
for m in $(seq 0 $MAXCARD);
for i in $(seq 0 $MAXTUNER);
     modprobe -vb saa7134 card=$m tuner=$i
     echo "Actual card is:" $m "tuner is:" $i
     lsmod | grep saa
     sleep 1 # this is to make sure /dev/video is registered when tvtime starts
     rmmod saa7134_alsa
     rmmod saa7134

But I can't unload saa7134 because saa7134_alsa is using it, and I can't unload saa7134_alsa, because, well, because the system doesn't feel like it. I've blacklisted the module (saa7134_alsa) but it gets loaded none the less and won't go away. So I'm kind of stuck here. Google didn't turn up anything useful. And I'm frustrated as hell. Any ideas? Thanks!
Posts: 3
Joined: 2016-01-15 14:46

Re: saa7134_alsa module won't unload

Postby kalle123 » 2016-01-16 07:15

The way, you did your posting here, chance to get an answer is very low.

Is that DEBIAN, you are using? I don't know. :roll:
First of all you should state about your computer.
What OS, what kind of hardware. And be specific .........
User avatar
Posts: 203
Joined: 2015-03-21 11:17
Location: Rhineland - Germany

Re: saa7134_alsa module won't unload

Postby igsNomad » 2016-01-17 13:13

Thanks for the reply. Since this is a debian forum I thought it was obvious. I'm sorry, I should have learned to not assume stuff by now but I still keep falling for that. So, below are the details I deem relevant:
OS is a clean install Debian 8 (Jessie) with main, contrib and non-free repos enabled.
Code: Select all
uname -a
Linux groot 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) x86_64 GNU/Linux

Code: Select all
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family H97 Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 750] (rev a2)
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)
05:00.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)

The TV card 05:00.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01) is quite old and I can't find its box but according to the handbook it should be FlyTV Prime34 FM, because it has a radio and supports multiple broadcast standards.
And a small update, I used the debian live image to try and run the script. rmmod complained about a null pointer in kernel and threw a long error at me but I was too much in a hurry to save it. I guess this is a bug and I'll try and report it to the bug tracker.
Posts: 3
Joined: 2016-01-15 14:46

Re: saa7134_alsa module won't unload

Postby igsNomad » 2016-02-21 15:38

So this is what I got:

I guess I couldn't manage to file a bug report either huh? :/

Any pointers/ideas?
Posts: 3
Joined: 2016-01-15 14:46

Re: saa7134_alsa module won't unload

Postby Head_on_a_Stick » 2016-02-21 15:47

Stop the modules loading at boot by adding this kernel command line parameter:
Code: Select all

If it works, make it permanent: ... obe.d.2F_2
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Posts: 8190
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: saa7134_alsa module won't unload

Postby dryden » 2017-11-21 21:40

No responses huh.

I have the same problem now; my card works but unloading saa7134_alsa fails and I just got an error for the first time,

I have no clue what it could be but being able to unload the module would solve a lot.

Unfortunately I am stuck at the same point.

Apparently the sound module gets used by some sound system.

Posts: 80
Joined: 2015-02-04 08:54

Re: saa7134_alsa module won't unload

Postby L_V » 2017-11-21 22:23

I presume it is a dvb card ? If so, try
Code: Select all
modprobe -r saa7134_dvb

To reset the card:
Code: Select all
modprobe -a tda1004x tda827x tuner
modprobe -r saa7134_dvb
modprobe saa7134_dvb

+ give ouput of
Code: Select all
lsmod |egrep "1004|7134"
Posts: 799
Joined: 2007-03-19 09:04

Re: saa7134_alsa module won't unload

Postby dryden » 2017-11-22 01:41

Look, the guy said he can't select cards because the sound module won't unload.

What good does it do to unload the dvr module. That won't allow him to select a different card.

But anyway here is a working script that will just kill pulseaudio and hope it is enough to unload the sound module, for me it is.

Code: Select all


func() {
    killall pulseaudio 2> /dev/null
    modprobe -r saa7134_empress saa7134_dvb saa7134_alsa saa7134_go7007
    while ! modprobe -r saa7134 && [ $counter -lt 10 ]; do
        sleep 1s
        counter=$(( counter + 1 ))

    lsmod | grep "^saa7134\s" -q && {
        echo "Could not unload module"
        exit 1

    modprobe saa7134 card=$1
    sleep 1s
    [ ! -e /dev/dvb/adapter0 ] && return 1
    echo "$2" >> working_list
    dvbv5-scan "$scanfile"
    [ -e dvb_channel.conf ]

for i in `seq 1 196`; do
    text=$(cat list | grep "card=$i " | sed "s/.*card=//")
    echo "Trying $text"
    func $i "$text" && break

You will need to change the scanfile to something you can use

and you need to download the attached file,

and you need to have dvbv5-scan installed.

It will exit as soon as there is a channel file.

It produces a list of semi-working cards in "working_list".

So put the "list.txt" file in the same directory as the script, and run it with sudo.

Code: Select all
card=0 -> UNKNOWN/GENERIC                         
card=1 -> Proteus Pro [philips reference design]   1131:2001 1131:2001
card=2 -> LifeView FlyVIDEO3000                    5168:0138 4e42:0138
card=3 -> LifeView/Typhoon FlyVIDEO2000            5168:0138 4e42:0138
card=4 -> EMPRESS                                  1131:6752
card=5 -> SKNet Monster TV                         1131:4e85
card=6 -> Tevion MD 9717                         
card=7 -> KNC One TV-Station RDS / Typhoon TV Tune 1131:fe01 1894:fe01
card=8 -> Terratec Cinergy 400 TV                  153b:1142
card=9 -> Medion 5044                             
card=10 -> Kworld/KuroutoShikou SAA7130-TVPCI     
card=11 -> Terratec Cinergy 600 TV                  153b:1143
card=12 -> Medion 7134                              16be:0003 16be:5000
card=13 -> Typhoon TV+Radio 90031                 
card=14 -> ELSA EX-VISION 300TV                     1048:226b
card=15 -> ELSA EX-VISION 500TV                     1048:226a
card=16 -> ASUS TV-FM 7134                          1043:4842 1043:4830 1043:4840
card=17 -> AOPEN VA1000 POWER                       1131:7133
card=18 -> BMK MPEX No Tuner                       
card=19 -> Compro VideoMate TV                      185b:c100
card=20 -> Matrox CronosPlus                        102b:48d0
card=21 -> 10MOONS PCI TV CAPTURE CARD              1131:2001
card=22 -> AverMedia M156 / Medion 2819             1461:a70b
card=23 -> BMK MPEX Tuner                         
card=24 -> KNC One TV-Station DVR                   1894:a006
card=25 -> ASUS TV-FM 7133                          1043:4843
card=26 -> Pinnacle PCTV Stereo (saa7134)           11bd:002b
card=27 -> Manli MuchTV M-TV002                   
card=28 -> Manli MuchTV M-TV001                   
card=29 -> Nagase Sangyo TransGear 3000TV           1461:050c
card=30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card( 1019:4cb4
card=31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card  1019:4cb5
card=32 -> AVACS SmartTV                           
card=33 -> AVerMedia DVD EZMaker                    1461:10ff
card=34 -> Noval Prime TV 7133                     
card=35 -> AverMedia AverTV Studio 305              1461:2115
card=36 -> UPMOST PURPLE TV                         12ab:0800
card=37 -> Items MuchTV Plus / IT-005             
card=38 -> Terratec Cinergy 200 TV                  153b:1152
card=39 -> LifeView FlyTV Platinum Mini             5168:0212 4e42:0212 5169:1502
card=40 -> Compro VideoMate TV PVR/FM               185b:c100
card=41 -> Compro VideoMate TV Gold+                185b:c100
card=42 -> Sabrent SBT-TVFM (saa7130)             
card=43 -> :Zolid Xpert TV7134                     
card=44 -> Empire PCI TV-Radio LE                 
card=45 -> Avermedia AVerTV Studio 307              1461:9715
card=46 -> AVerMedia Cardbus TV/Radio (E500)        1461:d6ee
card=47 -> Terratec Cinergy 400 mobile              153b:1162
card=48 -> Terratec Cinergy 600 TV MK3              153b:1158
card=49 -> Compro VideoMate Gold+ Pal               185b:c200
card=50 -> Pinnacle PCTV 300i DVB-T + PAL           11bd:002d
card=51 -> ProVideo PV952                           1540:9524
card=52 -> AverMedia AverTV/305                     1461:2108
card=53 -> ASUS TV-FM 7135                          1043:4845
card=54 -> LifeView FlyTV Platinum FM / Gold        5168:0214 5168:5214 1489:0214 5168:0304
card=55 -> LifeView FlyDVB-T DUO / MSI TV@nywhere D 5168:0306 4e42:0306
card=56 -> Avermedia AVerTV 307                     1461:a70a
card=57 -> Avermedia AVerTV GO 007 FM               1461:f31f
card=58 -> ADS Tech Instant TV (saa7135)            1421:0350 1421:0351 1421:0370 1421:1370
card=59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
card=60 -> LifeView/Typhoon/Genius FlyDVB-T Duo Car 5168:0502 4e42:0502 1489:0502
card=61 -> Philips TOUGH DVB-T reference design     1131:2004
card=62 -> Compro VideoMate TV Gold+II             
card=63 -> Kworld Xpert TV PVR7134                 
card=64 -> FlyTV mini Asus Digimatrix               1043:0210
card=65 -> V-Stream Studio TV Terminator           
card=66 -> Yuan TUN-900 (saa7135)                 
card=67 -> Beholder BeholdTV 409 FM                 0000:4091
card=68 -> GoTView 7135 PCI                         5456:7135
card=69 -> Philips EUROPA V3 reference design       1131:2004
card=70 -> Compro Videomate DVB-T300                185b:c900
card=71 -> Compro Videomate DVB-T200                185b:c901
card=72 -> RTD Embedded Technologies VFG7350        1435:7350
card=73 -> RTD Embedded Technologies VFG7330        1435:7330
card=74 -> LifeView FlyTV Platinum Mini2            14c0:1212
card=75 -> AVerMedia AVerTVHD MCE A180              1461:1044
card=76 -> SKNet MonsterTV Mobile                   1131:4ee9
card=77 -> Pinnacle PCTV 40i/50i/110i (saa7133)     11bd:002e
card=78 -> ASUSTeK P7131 Dual                       1043:4862
card=79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO
card=80 -> ASUS Digimatrix TV                       1043:0210
card=81 -> Philips Tiger reference design           1131:2018
card=82 -> MSI TV@Anywhere plus                     1462:6231 1462:8624
card=83 -> Terratec Cinergy 250 PCI TV              153b:1160
card=84 -> LifeView FlyDVB Trio                     5168:0319
card=85 -> AverTV DVB-T 777                         1461:2c05 1461:2c05
card=86 -> LifeView FlyDVB-T / Genius VideoWonder D 5168:0301 1489:0301
card=87 -> ADS Instant TV Duo Cardbus PTV331        0331:1421
card=88 -> Tevion/KWorld DVB-T 220RF                17de:7201
card=89 -> ELSA EX-VISION 700TV                     1048:226c
card=90 -> Kworld ATSC110/115                       17de:7350 17de:7352
card=91 -> AVerMedia A169 B                         1461:7360
card=92 -> AVerMedia A169 B1                        1461:6360
card=93 -> Medion 7134 Bridge #2                    16be:0005
card=94 -> LifeView FlyDVB-T Hybrid Cardbus/MSI TV  5168:3306 5168:3502 5168:3307 4e42:3502
card=95 -> LifeView FlyVIDEO3000 (NTSC)             5169:0138
card=96 -> Medion Md8800 Quadro                     16be:0007 16be:0008 16be:000d
card=97 -> LifeView FlyDVB-S /Acorp TV134DS         5168:0300 4e42:0300
card=98 -> Proteus Pro 2309                         0919:2003
card=99 -> AVerMedia TV Hybrid A16AR                1461:2c00
card=100 -> Asus Europa2 OEM                         1043:4860
card=101 -> Pinnacle PCTV 310i                       11bd:002f
card=102 -> Avermedia AVerTV Studio 507              1461:9715
card=103 -> Compro Videomate DVB-T200A             
card=104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid     0070:6700 0070:6701 0070:6702 0070:6703 0070:6704 0070:6705
card=105 -> Terratec Cinergy HT PCMCIA               153b:1172
card=106 -> Encore ENLTV                             1131:2342 1131:2341 3016:2344
card=107 -> Encore ENLTV-FM                          1131:230f
card=108 -> Terratec Cinergy HT PCI                  153b:1175
card=109 -> Philips Tiger - S Reference design     
card=110 -> Avermedia M102                           1461:f31e
card=111 -> ASUS P7131 4871                          1043:4871
card=112 -> ASUSTeK P7131 Hybrid                     1043:4876
card=113 -> Elitegroup ECS TVP3XP FM1246 Tuner Card  1019:4cb6
card=114 -> KWorld DVB-T 210                         17de:7250
card=115 -> Sabrent PCMCIA TV-PCB05                  0919:2003
card=116 -> 10MOONS TM300 TV Card                    1131:2304
card=117 -> Avermedia Super 007                      1461:f01d
card=118 -> Beholder BeholdTV 401                    0000:4016
card=119 -> Beholder BeholdTV 403                    0000:4036
card=120 -> Beholder BeholdTV 403 FM                 0000:4037
card=121 -> Beholder BeholdTV 405                    0000:4050
card=122 -> Beholder BeholdTV 405 FM                 0000:4051
card=123 -> Beholder BeholdTV 407                    0000:4070
card=124 -> Beholder BeholdTV 407 FM                 0000:4071
card=125 -> Beholder BeholdTV 409                    0000:4090
card=126 -> Beholder BeholdTV 505 FM                 5ace:5050
card=127 -> Beholder BeholdTV 507 FM / BeholdTV 509  5ace:5070 5ace:5090
card=128 -> Beholder BeholdTV Columbus TV/FM         0000:5201
card=129 -> Beholder BeholdTV 607 FM                 5ace:6070
card=130 -> Beholder BeholdTV M6                     5ace:6190
card=131 -> Twinhan Hybrid DTV-DVB 3056 PCI          1822:0022
card=132 -> Genius TVGO AM11MCE                     
card=133 -> NXP Snake DVB-S reference design       
card=134 -> Medion/Creatix CTX953 Hybrid             16be:0010
card=135 -> MSI TV@nywhere A/D v1.1                  1462:8625
card=136 -> AVerMedia Cardbus TV/Radio (E506R)       1461:f436
card=137 -> AVerMedia Hybrid TV/Radio (A16D)         1461:f936
card=138 -> Avermedia M115                           1461:a836
card=139 -> Compro VideoMate T750                    185b:c900
card=140 -> Avermedia DVB-S Pro A700                 1461:a7a1
card=141 -> Avermedia DVB-S Hybrid+FM A700           1461:a7a2
card=142 -> Beholder BeholdTV H6                     5ace:6290
card=143 -> Beholder BeholdTV M63                    5ace:6191
card=144 -> Beholder BeholdTV M6 Extra               5ace:6193
card=145 -> AVerMedia MiniPCI DVB-T Hybrid M103      1461:f636 1461:f736
card=146 -> ASUSTeK P7131 Analog                   
card=147 -> Asus Tiger 3in1                          1043:4878
card=148 -> Encore ENLTV-FM v5.3                     1a7f:2008
card=149 -> Avermedia PCI pure analog (M135A)        1461:f11d
card=150 -> Zogis Real Angel 220                   
card=151 -> ADS Tech Instant HDTV                    1421:0380
card=152 -> Asus Tiger Rev:1.00                      1043:4857
card=153 -> Kworld Plus TV Analog Lite PCI           17de:7128
card=154 -> Avermedia AVerTV GO 007 FM Plus          1461:f31d
card=155 -> Hauppauge WinTV-HVR1150 ATSC/QAM-Hybrid  0070:6706 0070:6708
card=156 -> Hauppauge WinTV-HVR1120 DVB-T/Hybrid     0070:6707 0070:6709 0070:670a
card=157 -> Avermedia AVerTV Studio 507UA            1461:a11b
card=158 -> AVerMedia Cardbus TV/Radio (E501R)       1461:b7e9
card=159 -> Beholder BeholdTV 505 RDS                0000:505b
card=160 -> Beholder BeholdTV 507 RDS                0000:5071
card=161 -> Beholder BeholdTV 507 RDS                0000:507b
card=162 -> Beholder BeholdTV 607 FM                 5ace:6071
card=163 -> Beholder BeholdTV 609 FM                 5ace:6090
card=164 -> Beholder BeholdTV 609 FM                 5ace:6091
card=165 -> Beholder BeholdTV 607 RDS                5ace:6072
card=166 -> Beholder BeholdTV 607 RDS                5ace:6073
card=167 -> Beholder BeholdTV 609 RDS                5ace:6092
card=168 -> Beholder BeholdTV 609 RDS                5ace:6093
card=169 -> Compro VideoMate S350/S300               185b:c900
card=170 -> AverMedia AverTV Studio 505              1461:a115
card=171 -> Beholder BeholdTV X7                     5ace:7595
card=172 -> RoverMedia TV Link Pro FM                19d1:0138
card=173 -> Zolid Hybrid TV Tuner PCI                1131:2004
card=174 -> Asus Europa Hybrid OEM                   1043:4847
card=175 -> Leadtek Winfast DTV1000S                 107d:6655
card=176 -> Beholder BeholdTV 505 RDS                0000:5051
card=177 -> Hawell HW-404M7                         
card=178 -> Beholder BeholdTV H7                     5ace:7190
card=179 -> Beholder BeholdTV A7                     5ace:7090
card=180 -> Avermedia PCI M733A                      1461:4155 1461:4255
card=181 -> TechoTrend TT-budget T-3000              13c2:2804
card=182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid  17de:b136
card=183 -> Compro VideoMate Vista M1F               185b:c900
card=184 -> Encore ENLTV-FM 3                        1a7f:2108
card=185 -> MagicPro ProHDTV Pro2 DMB-TH/Hybrid      17de:d136
card=186 -> Beholder BeholdTV 501                    5ace:5010
card=187 -> Beholder BeholdTV 503 FM                 5ace:5030
card=188 -> Sensoray 811/911                         6000:0811 6000:0911
card=189 -> Kworld PC150-U                           17de:a134
card=190 -> Asus My Cinema PS3-100                   1043:48cd
card=191 -> Hawell HW-9004V1                       
card=192 -> AverMedia AverTV Satellite Hybrid+FM A70 1461:2055
card=193 -> WIS Voyager or compatible                1905:7007
card=194 -> AverMedia AverTV/505                     1461:a10a
card=195 -> Leadtek Winfast TV2100 FM                107d:6f3a
card=196 -> SnaZio* TVPVR PRO                        1779:13cf
Last edited by dryden on 2017-11-22 01:48, edited 2 times in total.
Posts: 80
Joined: 2015-02-04 08:54

Re: saa7134_alsa module won't unload

Postby dryden » 2017-11-22 01:46

Maybe I am mistaken about your response but my card worked and for some reason it stopped,

And I don't think listing my modules will do much good.

Also it is currently filled with remainders from running that script lol.

I had a working card yesterday and today. I changed nothing about my system but suddenly it stopped working again.

But it is not a Debian system, it is Kubuntu. I was just responding to the guy here, even if it's a bit old.

I think other people will run into the unload issue as well.
Posts: 80
Joined: 2015-02-04 08:54

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests