Skip to main content

Thread: HOW TO: Maudio 2496 (ICE1712) - pulseaudio - resume from suspend hibernate workaround


hello crazy kids!

decided write 'how to' of can't m-audio audiophile 2496 sound card working in ubuntu. i'm using ubuntu hardy 8.04 x64, may work others too. i've read many other guides , bug threads helped me working finally.
fresh installed ubuntu detect card , audio works straight away... ...but want have full control on audio (especially if have more 1 sound device) therefore end installing pulseaudio , trouble begins.
pulseaudio has way controlling output , input audio streams on sound devices in ubuntu audiophile 2496 card not visible in pulseaudio volume control default. second bad thing card (which of might have noticed already) won't work when resume suspended or hibernated system. me real nightmare. not able hibernate in new ubuntu 9 - jauty jackalope , because use hibernation time had stay older ubuntu hardy. finding sound gone when resuming in hardy real 'kick smiling face'. anyway i've done working:

1.) first of you'll need install , setup pulseadio. give link excellent guide show steps i've taken there. please note guide ends step 4. log out & log in again. before you'll need add lines default.pa file m-audio 2496 show in pulseaudio volume control. default.pa file configuration file pulseaudio. so, here link guide , these steps i've done (steps hardy heron x64):

steps section in short:

code:
$ mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/ $ rm -r ~/.pulse ~/.asound* $ sudo rm /etc/asound.conf  $ sudo apt-get install libasound2-plugins padevchooser libsdl1.2debian-pulseaudio  $ sudo apt-get remove --purge libflashsupport flashplugin-nonfree-extrasound
steps section b:

install getlibs-all (64-bit users only). link wget in guide broken downloaded getlibs-all.deb from here, clicked right mouse button on file , installed 'gdebi package installer'. after done run:
code:
$ sudo getlibs -p libnss3-1d libnspr4-0d libcurl3 libasound2-plugins
edit /etc/apt/sources.list:
code:
$ gksudo gedit /etc/apt/sources.list
if don't exist, add following lines end of file , save:
code:
# pulseaudio fixes - http://ubuntuforums.org/showthread.php?t=789578 deb http://ppa.launchpad.net/psyke83/ubuntu hardy main deb-src http://ppa.launchpad.net/psyke83/ubuntu hardy main
add authentication key ppa, update repositories , upgrade packages:
code:
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 16ae4e77 && sudo apt-get update && sudo apt-get dist-upgrade
enable pulseaudio alsa plugins:
code:
$ asoundconf set-pulseaudio
the next step open pulseaudio config file:
code:
$ sudo gedit /etc/pulse/default.pa
select, copy , paste following lines @ end of file (more info workaround can found here or here):
code:
# workaround maudio audiophile # added comment rod40cool - (sta audio media 7.1 card uses same ice1712 driver) # added comment rod40cool - run command "asoundconf list" determine add after "device=hw:????" # added comment rod40cool - make sure after pasting there 2 lines below starting each "load-module module..."  load-module module-alsa-sink sink_name=m2496_out device=hw:m2496 format=s32le channels=10 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7 load-module module-alsa-source source_name=m2496_in device=hw:m2496 format=s32le channels=12 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9
save file, log out , log in back.

should have pulseaudio , m-audio 2496 working fine , able switch input , output audio streams on audio devices.

there no sound after resume hibernate or suspend. can see whole application try play audio/video in going slow, video picture jumps or there similar happening. - read - due linux driver. driver lacks support resume on sound card basically.
way found around reload driver module card after resume system. restart pulseaudio , set mixer levels (not main volume). because of module reload applications using audio have restarted after resume. that's quite annoying. luckily in firefox complete restart not necessary. if had youtube opened reopen tab again. example skype doesn't need restart , can survive driver reload , pulseaudio restart.

follow these steps bring sound on resume hibernate/suspend:

in order able reload driver module processes using audio devices must killed:
code:
$ sudo fuser -s -k /dev/snd/*
shut down , start again maudio soundcard module:
code:
$ sudo rmmod snd_ice1712 $ sudo modprobe snd_ice1712
kill pulseaudio:
code:
$ sudo killall pulseaudio
start pulse audio deamon again:
code:
$ sudo pulseaudio -d
because pulseaudio restart cause volume drop on dac , adc necessary set these mixer levels again (main volume not affected good):
code:
$ amixer -q -c 0 set 'dac',0 100% $ amixer -q -c 0 set 'dac',1 100%
please make sure argument in 2 commands above after '-c' option number of maudio sound card. in case 0. if unsure number card has do:
code:
asoundconf list
and list of audio devices. indexed top starting zero. if see m2496 on top argument after '-c' should 0.

ok that's it. don't forget restart applications using audio before. should have sound working fine again.

done. don't want run commands every time resume system, you? neither i. so, have written resume script crazy kids. there issue this. in order pulseaudio daemon in resume script has started in 'system mode' otherwise startup fails because user not logged in yet basically. can google 'pulseaudio system mode' if want know more , mean you. please note script must have resume-hook format don't change structure when edit it. found annoying other sound devices (motherboard sound card , web cam mic) don't show in pulseaudio volume control after killed , started again , sound card number not 0. because of shut down , start other audio devices modules well. in case it's 1 more module named 'snd_usb_audio'. find own modules use command 'lsmod'.

final script use:
code:
#!/bin/bash  . /usr/lib/pm-utils/functions  resume_maudio() {     sudo fuser -s -k /dev/snd/*     sudo rmmod snd_ice1712     sudo modprobe snd_ice1712     sudo rmmod snd_usb_audio     sudo modprobe snd_usb_audio     sudo killall pulseaudio     sudo pulseaudio --system -d     amixer -q -c 0 set 'dac',0 100%     amixer -q -c 0 set 'dac',1 100% }  case "$1" in     hibernate|suspend)                 ;;     thaw|resume)         resume_maudio         ;;     *)         ;; esac  exit $?
to use script in system start text editor root:
code:
$ sudo gedit 01maudio_resume
i named script '01maudio_resume' purposely. prefix '01' cause script executed @ end of resume process.

select, copy , paste text script above editor window. file -> save as. navigate /etc/pm/sleep.d/ , save file in folder. folder empty before.

make script executable:
code:
$ sudo chmod +x /etc/pm/sleep.d/01maudio_resume
because pulseaudio using separate configuration file 'system.pa' running in system mode we'll create copy of 'default.pa' , name 'system.pa':
code:
$ sudo cp /etc/pulse/default.pa /etc/pulse/system.pa
that's crazy kids. next time resume play music loud!

thank guide. let me start saying novice. installed ubuntu karmic on pc bought. have audiophile 2496 , sound not work on resume suspend. when suspend hear crackling noise speakers. followed instructions "follow these steps bring sound on resume hibernate/suspend:"
pulseaudio installed , version 1:0.0.19.
tried first execute commands of script 1 one.
command "pulseaudio -d" generates "e: main.c: daemon startup failed."
appreciate help!


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Multimedia Software [ubuntu] HOW TO: Maudio 2496 (ICE1712) - pulseaudio - resume from suspend hibernate workaround


Ubuntu

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support