LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-12-2009, 05:47 PM   #1
veezee
LQ Newbie
 
Registered: Oct 2004
Posts: 16

Rep: Reputation: 0
i need some help to patch ehci-hcd - please read


After hours / days of trying to get my USB Tascam US-122L working with Alsa, I find out that drivers/usb/host/ehci-hcd.c needs to be patched.

What I am not sure of (and google is not much help unless its a bzip2 patch from kernel.org) is how to do it. The link below is a copy of the working patch. So my questions are, exactly what do I copy and place into a file as a patch , and how do I apply it?

the patch is https://lists.ubuntu.com/archives/ke...ch/004638.html

Would patch </pathto/orig file> </pathto/target file> work?

I tried this (or it was target original) but I think the code I pasted from the mailing list was not right.

Oh one more thing.. The creator of this patch says 2.6.29-rc3 is patched for this .. should i patch 2.6.28 with patch-2.6.29-rc3 and go with that OR can i even just go to the lasted rc for 2.6.29?

Thank you!

Last edited by veezee; 09-12-2009 at 05:49 PM.
 
Old 09-12-2009, 07:42 PM   #2
jdines
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
Thumbs up Just use a recent kernel, no need to patch anymore

Code:
The creator of this patch says 2.6.29-rc3 is patched for this .. 
should i patch 2.6.28 with patch-2.6.29-rc3 and go with that 
OR can i even just go to the lasted rc for 2.6.29?
Just use any kernel from 2.6.29-rc3 on, as the us122l code has been accepted into the mainline kernel and the ehci patch got applied in that version. (I have a us122l, and jumped through all the hoops to get it working, but that isnt necessary anymore. Just use a more recent kernel.)

Last edited by jdines; 09-12-2009 at 07:45 PM.
 
Old 09-12-2009, 09:28 PM   #3
veezee
LQ Newbie
 
Registered: Oct 2004
Posts: 16

Original Poster
Rep: Reputation: 0
[QUOTE=jdines;3680523]
Code:
The creator of this patch says 2.6.29-rc3 is patched for this .. 
should i patch 2.6.28 with patch-2.6.29-rc3 and go with that 
OR can i even just go to the lasted rc for 2.6.29?
Just use any kernel from 2.6.29-rc3 on, as the us122l code has been accepted into the mainline kernel and the ehci patch got applied in that version. (I have a us122l, and jumped through all the hoops to get it working, but that isnt necessary anymore. Just use a more recent kernel.)[/QUOTE

i tried 2.6.29rc3 , but cat /proc/asound/cards and /proc/asound/cards show nothing detected. when i go back to 2.6.28 , it detects.

Any tips/suggestions ? what does your .config look like>? did you enable alsa as a module as well has the us122l?

the funny thing is, when i compiled this kernel , i used the old config from 2.6.28.

what kernel are you running right now?

thanks for your reply!
 
Old 09-13-2009, 07:21 AM   #4
jdines
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
Cool

Did you do the modprobe of snd-usb-122l module?

Quote:
[root@stormbringer ~]# modprobe snd-usb-us122l
[root@stormbringer ~]# lsmod | grep us122l
snd_usb_us122l 15712 0
snd_usb_lib 18116 1 snd_usb_us122l
snd_hwdep 8008 2 snd_usb_us122l,snd_hda_codec
snd 66948 20 snd_usb_us122l,snd_rawmidi,snd_hda_codec_idt,snd_hda_codec_intelhdmi,snd_hda_intel,snd_hda_codec,snd _hwdep,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
usbcore 197808 6 snd_usb_us122l,snd_usb_lib,uvcvideo,ehci_hcd,uhci_hcd
Then without the unit plugged in I get:

Quote:
[root@stormbringer ~]# cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfe9fc000 irq 21
I thought something was wrong, then I remembered I needed the hardware plugged into the USB port ... DOH!!???

Quote:
[root@stormbringer ~]# cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfe9fc000 irq 21
1 [US122L ]: USB US-122L - TASCAM US-122L
TASCAM US-122L (644:800e if 0 at 007/002)

And here is the kernel version:

Quote:
[root@stormbringer ~]# uname -r
2.6.31-desktop586-1mnb
Unfortunately I will be gone for two weeks starting in a few hours, so I will not be able to help you further until after then unless you see this and reply very quickly. :-(

Note that I am using a stock Mandriva kernel. I use Mandriva's "cooker" which is bleading edge Mandriva. In my experience Mandriva beats pretty much every other desktop distribution out there, and also in my not so humble opinion it is miles ahead of Ubuntu. In any case, good luck.

Disclaimer: I do not work for Mandriva, but I have been an avid Mandriva user for more than 7 years. I have also used Ubuntu, Kubuntu, Gentoo, and many others. I contribute to Mandriva by doing Beta testing and feeding back to the qa.mandriva.com wiki.
 
Old 09-13-2009, 03:45 PM   #5
veezee
LQ Newbie
 
Registered: Oct 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdines View Post
Did you do the modprobe of snd-usb-122l module?



Then without the unit plugged in I get:



I thought something was wrong, then I remembered I needed the hardware plugged into the USB port ... DOH!!???




And here is the kernel version:



Unfortunately I will be gone for two weeks starting in a few hours, so I will not be able to help you further until after then unless you see this and reply very quickly. :-(

Note that I am using a stock Mandriva kernel. I use Mandriva's "cooker" which is bleading edge Mandriva. In my experience Mandriva beats pretty much every other desktop distribution out there, and also in my not so humble opinion it is miles ahead of Ubuntu. In any case, good luck.

Disclaimer: I do not work for Mandriva, but I have been an avid Mandriva user for more than 7 years. I have also used Ubuntu, Kubuntu, Gentoo, and many others. I contribute to Mandriva by doing Beta testing and feeding back to the qa.mandriva.com wiki.
I probably missed you, but hope not. I have made some progress. By upgrading the kernel , I can hear my speakers "kick in " when ubuntu is booting. I think at this point it is a alsa configuration issue. All signs are showing my card detected, but i still see some errors in dmesg. A lot of time it hangs during bootup until i unplug the tascam as well. I am wondering if it is conflicting with something?

alsamixer says "no mixer elements" .

What version of alsa are you using?

Hope your still here

Anyone else?
 
Old 10-15-2009, 04:23 PM   #6
jdines
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
Using US122L with Linux - SOLVED

Greetings,

I am back now, and had the opportunity to get this all working with Mandriva 2010 Beta, so I was reminded of all the issues and thought I would share it with you. Some commands must be run as the root user, while others can be run as a normal user. I have tried to show this in the example commands by boldfacing the user name in the command line examples. Every attempt has been made to be complete and accurate, but please feed back with any questions or comments so that I can put together a comprehensive PDF that everyone can use and enjoy!

Using the US122L with Linux to create a true Digital Audio Workstation:

1) Use a recent kernel and you will not need to patch the kernel:
Code:
[root@stormbringer ~]# uname -r
2.6.31.4-desktop586-0.rc2.1mnb
[The first three numbers seperated by the dots are all we care about (e.g. 2.6.31 in this case; the fourth is a minor revision number and the rest are distribution and platform specific]

(2.6.28 or greater should work "out of the box")

2) Make sure you use ALSA 1.0.18 or greater:
Code:
[root@stormbringer ~]# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.
3) Tell ALSA about the availability of the US122L over the USB bus by creating a /etc/asound.conf file, making sure to change the 2 to whatever number maps to your US122l in the output of cat /proc/asound/cards:

Code:
[jdines@stormbringer ~]$ cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfe9fc000 irq 21
 1 [US122L         ]: USB US-122L - TASCAM US-122L
                      TASCAM US-122L (644:800e if 0 at 002/005)
Code:
[root@stormbringer ~]# cat /etc/asound.conf
pcm.usb_stream {
        @args [ CARD ]
        @args.CARD {
                type string
                default "YOUR_CARD_NUMBER_HERE"
        }
        type usb_stream
        card $CARD
}
Alternatively, you should be able to create a .asoundrc file in your users home directory, e.g. :

Code:
# The usb_stream plugin configuration
pcm.!usb_stream {
  @args [ CARD ]
  @args.CARD {
    type string
    default "1"
  }
  type usb_stream
  card $CARD
}
4) Test it using aplay and arecord:

Simple Loopback:


Quote:
ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
(Note that if your card number is not 1 in /proc/asound/cards output replace the 1 with the correct number, such as the following if your card number is 2 for example ...)

Quote:
ARGS="-MDusb_stream:2 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
Code:
[jdines@stormbringer ~]$ ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
Recording WAVE 'stdin' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo
Playing WAVE 'stdin' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...
Aborted by signal Interrupt...
Record Something: (use control-c to break when done)

Quote:
ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS > test-sound-from-us122l.wav

Play it Back:

Code:
[jdines@stormbringer ~]$ aplay -MDusb_stream:1 -fS24_3LE -r44100 -c2 -twav --period-size=640 test-recording-from-us122l.wav
Playing WAVE 'test-recording-from-us122l.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo


Ardour Use / Using the JACK Audio Connection Kit:


Once the card is working you will probably want to use it with Ardour (http://ardour.org/). Obviously you will need to install it using your distributions repository. Here is what you need to know to get started:

Telling JACK to use the US122l:

Ardour makes use of the JACK Audio Connection Kit (http://jackaudio.org/)

Your distrubution probably has a GUI based control interface available, e.g. qjackctl for KDE based distributions. You can install such a GUI interface or jackd can be started from the command line (see man jackd for the options to pass to jackstart)

However you start the JACK daemon jackd, be sure to tell jackd to use usb_stream:1 (or whatever your card number as reported by /proc/asound/cards) and if you use the --realtime option be sure to read the notes below regarding enabling your user account to start jackd in realtime mode.

Allowing Use of JACK in realtime mode:

1) Make sure your user is a member of the audio group

2) Make sure you have the following lines setting the audio group limits for realtime priority (rtprio), nice value, and memlock limit in your /etc/security/limits.conf file:

Code:
[root@stormbringer ~]# tail /etc/security/limits.conf
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

*               -       rtprio           0
*               -       nice             0
@audio          -       rtprio           50
@audio          -       nice             -10
@audio          -       memlock          250000
# End of file
(Edit /etc/security/limits.conf as the root user if needed)

References:

http://ardour.org/
http://jackaudio.org/
http://www.premiumorange.com/la-page...p?page=P030101
http://wiki.briata.org/doku.php
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ehci-hcd on sis648 freeze system kubokubik Linux - Hardware 0 03-08-2005 01:25 AM
Problem in loading ehci-hcd driver amit10p Linux - Software 0 07-16-2004 12:50 AM
ehci-hcd fails on boot: no such device simonro Linux - Newbie 3 01-12-2004 12:28 PM
ehci-hcd failure on boot (RH 9.0) podollb Linux - Hardware 2 10-16-2003 11:48 AM
insmod ehci-hcd failed cpudney Linux - Laptop and Netbook 0 08-03-2003 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration