Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED?]Lirc with livedrive_midi stopped working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Sun Dec 05, 2010 2:01 pm    Post subject: [SOLVED?]Lirc with livedrive_midi stopped working Reply with quote

Hi

Until yesterday, I've had working Lirc with my Audigy 2 Platinum ex, with livedrive_midi driver with rm-1000 remote on my gentoo ~amd64 system.
But yesterday I've re-emerged world, and updated system - and lirc stopped working :/

cat /dev/snd/midiC0D1 shows something when I'm pressing buttons on my remote, but irw shows nothing ...

What have I done to fix it:
- search bugs.gentoo.org for lirc error
- search google
- changing /etc/conf.d/lircd
- changing /etc/lirc/lirc.conf
- update lirc to 0.9.0_pre1
- downgrade kernel to 2.3.35

And nothing works :/ irw still shows nothing ... What changed, and what I'm doing wrong ? :evil:
irrecord is trying to record keycodes, but in result file it looks like it recorded every key as code 0 :
Code:
KEY_VOLUMEUP             0x00000000

My /etc/conf.d/lircd file :
Code:
LIRCD_OPTS="-d /dev/snd/midiC0D1 -H livedrive_midi"

my /etc/lirc/lirc.conf file :
Code:
begin remote

  name  rm1000w
  flags SPACE_ENC|CONST_LENGTH
  bits           16
  eps            30
  aeps          100

  header          9000 4500
  one             563  1687
  zero            563  562
  pre_data_bits   16
  pre_data       0x8322
  gap          108000
  toggle_bit      0

  repeat          9000 2250
 
  frequency    38000
  duty_cycle   33


      begin codes
          1                        0x0000000000008B74
          2                        0x0000000000008F70
          3                        0x000000000000906F
          4                        0x0000000000008A75
          5                        0x000000000000847B
          6                        0x0000000000007887
          7                        0x0000000000008976
          8                        0x000000000000837C
          9                        0x0000000000007788
          0                        0x000000000000807F
          stop                     0x000000000000857A
          play                     0x0000000000007986
          pause                    0x0000000000007986
          slow                     0x0000000000007D82
          step                     0x0000000000007E81
          prev                     0x0000000000007F80
          next                     0x0000000000007A85
          mute                     0x0000000000006E91
          vol-                     0x000000000000639C
          vol+                     0x000000000000629D
          eax                      0x0000000000008C73
          options                  0x000000000000827D
          display                  0x0000000000007689
          return                   0x0000000000008E71
          start                    0x0000000000008877
          close                    0x0000000000007C83
          up                       0x0000000000007B84
          down                     0x0000000000008D72
          left                     0x0000000000008778
          right                    0x000000000000758A
          ok                       0x000000000000817E
     power                    0x000000000000619e
     cmss                     0x000000000000718e
     record                   0x000000000000738c
    
      end codes

end remote

#
# contributed by Stefan Br�ns
#
# brand: Creative Audigy 2 ZS Platinum LiveDrive
# model no. of remote control:
# devices being controlled by this remote:
#


begin remote


  name  LiveDrive
  flags SPACE_ENC|CONST_LENGTH
  bits           16
  eps            30
  aeps          100


  header          9000 4500
  one             563  1687
  zero            563  562
  pre_data_bits   16
  pre_data       0x8000
  gap          108000
  toggle_bit      0


  repeat          9000 2250


  frequency    38000
  duty_cycle   33




      begin codes
          mute                     0x0000000000000040
          vol+                     0x0000000000008080
          vol-                     0x0000000000008082
          cmss                     0x0000000000000080
      end codes
end remote

begin remote

  name  LiveDrive_Headphone
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       9000  4500
  one           563  1687
  zero          563   562
  repeat       9000  2250
  pre_data_bits   16
  pre_data       0x8000
  gap          108000
  toggle_bit      0

  frequency    38000
  duty_cycle   33

      begin codes
          Headphone_out            0x4000
          Headphone_in             0x4080
      end codes

end remote



My emerge --info:
Code:
Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.5.1, glibc-2.12.1-r3, 2.6.35-gentoo-r13 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r13-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4000+-with-gentoo-2.0.1
Timestamp of tree: Sun, 05 Dec 2010 10:30:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r2
dev-lang/python:     2.7.1, 3.1.3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.7
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="pl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/layman/roslin /usr/local/portage /usr/local/layman/sunrise /usr/local/layman/multimedia"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acl alsa amd64 berkdb bzip2 cairo cli cracklib crypt cups cxx dbus djvu dri dts dvd encode fam fortran gconf gdbm gif glib gnome gpm gtk hal iconv ieee1394 java jpeg jpeg2k lame libsamplerate lirc mad mmx mmxext modules mp3 mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl pic png policykit pppd python qt3support readline samba sdl session smp spell sse sse2 ssl svg sysfs tcpd threads thunar tiff truetype type1 unicode v4l v4l2 vorbis wavpack x264 xcomposite xinerama xml xmp xorg xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" LIRC_DEVICES="livedrive_midi" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Thanks for help!
_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth


Last edited by n0rbi666 on Tue May 17, 2011 5:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
IanPo
n00b
n00b


Joined: 30 May 2006
Posts: 64
Location: Moscow, Russia

PostPosted: Fri Dec 10, 2010 5:23 pm    Post subject: Reply with quote

Hi!
Your lirc.conf file contains duplicate remote definitions.
I suppose, two for rm-1000 and livedrive handle and cmss button is enough.
Look at my file for comparision:

Code:


begin remote

  name  Creative_RM-1500
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       9078  4671
  one           663  1607
  zero          663   497
  ptrail        662
  repeat       9078  2216
  pre_data_bits   16
  pre_data       0x8322
  gap          106974
  min_repeat      4
  toggle_bit      0


      begin codes
          power                  0x000000000000619E
          1                        0x0000000000008B74
          2                        0x0000000000008F70
          3                        0x000000000000906F
          4                        0x0000000000008A75
          5                        0x000000000000847B
          6                        0x0000000000007887
          7                        0x0000000000008976
          8                        0x000000000000837C
          9                        0x0000000000007788
          0                        0x000000000000807F
          cmss                   0x000000000000718E
          eax                    0x0000000000008C73
          mute                   0x0000000000006E91
          vol-                    0x000000000000639C
          vol+                    0x000000000000629D
          up                       0x0000000000007B84
          left                    0x0000000000008778
          ok                       0x000000000000817E
          right                  0x000000000000758A
          down                   0x0000000000008D72
          return                 0x0000000000008E71
          start                    0x0000000000008877
          cancel                   0x0000000000007C83
          rec                      0x000000000000738C
          options                  0x000000000000827D
          display                  0x0000000000007689
          previous                 0x0000000000007F80
          play                     0x0000000000007986
          next                     0x0000000000007A85
          slow                     0x0000000000007D82
          stop                     0x000000000000857A
          step                     0x0000000000007E81
      end codes

end remote

begin remote

  name  LiveDrive
  flags SPACE_ENC|CONST_LENGTH
  bits           16
  eps            30
  aeps          100


  header          9000 4500
  one             563  1687
  zero            563  562
  pre_data_bits   16
  pre_data        0x8000
  gap             108000
  toggle_bit      0
  repeat          9000 2250
  frequency    38000
  duty_cycle   33

      begin codes
          mute                     0x0000000000000040
          vol+                     0x0000000000008080
          vol-                     0x0000000000008082
          cmss                     0x0000000000000080
      end codes

end remote


To restart lirc:
Code:

/etc/init.d/lircd restart


Do you have initial sequence in one of your startup files (IR sensor may not work without it)?
echo -e '\360\000\040\041\141\000\000\000\177\000\367' > /dev/snd/midiC0D1
or
echo -en "\xf0\x00\x20\x21\x61\x00\x00\x00\x7f\x00\xf7" > /dev/snd/midiC0D1

Could you show your ~/.lircrc ?
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Sun Dec 12, 2010 1:19 pm    Post subject: Reply with quote

Sorry, I've pasted lirc.conf 3 times - now it's ok, so I don't have any duplicate remote. It's lirc.conf from /usr/share/lirc/remotes/creative/lircd.conf.livedrive
And before emerge -e world it was working.
And I have that echo in mt /etc/conf.d/local :
Code:
echo -en "\xf0\x00\x20\x21\x61\x00\x00\x00\x7f\x00\xf7" > /dev/snd/midiC0D1


My .lirc
Code:
begin
    prog   = irexec
    button = vol+
    repeat = 1
    config = amixer set Master 3+
end
begin
    prog   = irexec
    button = vol-
    repeat = 1
    config = amixer set Master 3-
end
begin
    prog = irexec
    button = play
    repeat = 0
    config = mpc toggle
end
begin
    prog = irexec
    button = next
    repeat = 1
    config = mpc next
end
begin
    prog = irexec
    button = prev
    repeat = 1
    config = mpc prev
end
begin
    prog = irexec
    button = stop
    config = mpc stop
end
begin
    prog = irexec
    button = power
    repeat = 0
    config = sonata&
end
begin
    prog = irexec
    button = ok
#    repeat = 0
    config = smplayer -send-action pause
end
begin
    prog = irexec
    button = left
    repeat = 1
    config = smplayer -send-action rewind1
end
begin
    prog = irexec
    button = right
    repeat = 1
    config = smplayer -send-action forward1
end

_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth
Back to top
View user's profile Send private message
IanPo
n00b
n00b


Joined: 30 May 2006
Posts: 64
Location: Moscow, Russia

PostPosted: Sun Dec 12, 2010 6:14 pm    Post subject: Reply with quote

Does /etc/init.d/lircd start OK ?
As i take it, livedrive's LED blinks when you push a button on your remote, right ?
Did you try revdep-rebuild ?
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2443
Location: Silver City, NM

PostPosted: Sun Dec 12, 2010 9:41 pm    Post subject: Reply with quote

I just ran into a similar problem and it is very strange. I too emerged -uDN world and lirc stopped working after I rebooted this morning. Doing "/etc/init.d/lrircd start" does start it. Then I had problems with HAL not working so I did a Ctrl-Alt-F1 to see if there were any problems at boot-time and the screen started to scroll and the last part of the boot process started up!

So after emerging world, I now have a problem that the boot process halts right after xdm is started (I presume) and only starts up again when I go back to the first virtual console. I will start a new thread on this topic.
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Mon Dec 13, 2010 4:32 pm    Post subject: Reply with quote

IanPo wrote:
Does /etc/init.d/lircd start OK ?
Yes, no errors in /var/log/messages and in dmesg, and when I run lircd -n -H livedrive_midi -d /dev/snd/midiC0D1 - it starts ok and does not show any error.
Quote:
As i take it, livedrive's LED blinks when you push a button on your remote, right ?
Yes, the led blinks as usual, and cat /dev/snd/midiC0D1 gives output when I'm pressing buttons on remote, so I think it's problem with lirc itself.
Quote:
Did you try revdep-rebuild ?
Yes, I've tried it, tried emerge -uD --newuse world, re-emerge lirc, and nothing helps :/
_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth
Back to top
View user's profile Send private message
IanPo
n00b
n00b


Joined: 30 May 2006
Posts: 64
Location: Moscow, Russia

PostPosted: Mon Dec 13, 2010 5:13 pm    Post subject: Reply with quote

I tend to think that the problem is in lircd.conf or it's not loaded correctly.
Filename is /etc/lirc/lircd.conf, not lirc.conf, by the way ;) I did not pay attention on that in my previous post.
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Mon Dec 13, 2010 5:51 pm    Post subject: Reply with quote

Yes, it's lircd.conf ;)
But :
1) It was working earlier, and I didn't changed anything in lircd.conf
2) it's official lircd.conf, so it should work ;-)
_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth
Back to top
View user's profile Send private message
dracula1985
Apprentice
Apprentice


Joined: 13 May 2005
Posts: 294
Location: Vicenza (Italy)

PostPosted: Sun Mar 13, 2011 10:50 am    Post subject: Reply with quote

Same problem here, irrecord see all buttons as 0x00000000
With lircd stopped cat /dev/snd/midiC0D1 shows keycodes but with lircd started it doesn't show anything and the same is for irw.
Have you found any solution?
_________________
Marco

"Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth." --Oscar Wilde.
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Sun May 01, 2011 1:28 pm    Post subject: Reply with quote

Yes - I've installed Ubuntu 10.10, and it was working. But after update to 11.04 it stopped working :cry:
_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 703
Location: Poland -> Krakow

PostPosted: Tue May 17, 2011 5:55 pm    Post subject: Reply with quote

Solution, that worked for ubuntu :
http://ubuntuforums.org/showthread.php?p=10828095#post10828095

bokkertoff wrote:
Hi. I solved this problem.

Here are the steps that you need to do to get it working.

It seems like the lirc livedrive_midi code has some problems with the gcc 4.5.2 compiler that ships with ubuntu 11.04.

I installed gcc 4.4.5 (sudo apt-get install gcc-4.4)

Next change to some directory where you can build the new package.

Next get the source: sudo apt-get source lirc

Change to the lirc directory: cd lirc-0.8.7

Set the CC evironment variable to gcc-4.4
In bash/sh "export CC=gcc-4.4".
In tcsh/csh "setenv CC gcc-4.4".

Try to build the package: dpkg-buildpackage -us -uc -nc

This will probably fail with dependency problems. The build environment has a lot of dependencies. On my system I had to add the following as well:

sudo apt-get install debhelper libusb-dev libasound2-dev libice-dev libsm-dev libirman-dev libftdi-dev autotools-dev portaudio19-dev devscripts quilt libxt-dev po-debconf

If there are any other dependencies, simply install them the same way as above.

Rerun "dpkg-buildpackage -us -uc -nc". If all goes well, you can do "cd .."
There should now be a few new packages in the current directory.

You can install it by doing "sudo dpkg -i lirc_0.8.7-0ubuntu4.1_amd64.deb". It should not be necessary to install the other packages.

My /etc/lirc/ hardware.conf looks like this:

Code:

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Creative LiveDrive midi"
REMOTE_MODULES=""
REMOTE_DRIVER="livedrive_midi"
REMOTE_DEVICE="/dev/snd/midiC0D1"
REMOTE_LIRCD_CONF="creative/lircd.conf.livedrive"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
REMOTE_SOCKET=""
TRANSMITTER_SOCKET=""


Hope this works for you as well.

_________________
Trying to forget (Wasting my time)
We're falling right through
Lying to forget (Telling more lies)
We're raising our truth
Back to top
View user's profile Send private message
dracula1985
Apprentice
Apprentice


Joined: 13 May 2005
Posts: 294
Location: Vicenza (Italy)

PostPosted: Wed May 18, 2011 7:44 pm    Post subject: Reply with quote

Building lirc with gcc-4.4.5 selected worked for me.

I updated my bugreport: http://bugs.gentoo.org/show_bug.cgi?id=358699

Steps to solve this problem:
emerge --oneshot "=sys-devel/gcc-4.4.5"
gcc-config x86_64-pc-linux-gnu-4.4.5
source /etc/profile
emerge --oneshot app-misc/lirc
gcc-config x86_64-pc-linux-gnu-4.5.2
source /etc/profile
_________________
Marco

"Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth." --Oscar Wilde.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum