Jump to content

jensverwiebe

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1

jensverwiebe last won the day on June 22 2018

jensverwiebe had the most liked content!

Community Reputation

7 Neutral

1 Follower

About jensverwiebe

  • Rank
    Just Startin'

Profile Information

  • Registered Products
    1

Recent Profile Visitors

212 profile views
  1. jensverwiebe

    Line 6 With Linux?

    Hi Johan 1.The error is not distro agnostic but a kernel/alsa thing. 2.To me it looks you are compiling from the wrong directory. Make sure to stay inside the gotten sourcedir usb dir. In your case it should be cd /home/johan/kernelbuild/linux-5.1.15/sound/usb Or: Get this patch and scriptset from me: www.jensverwiebe.de/Other/audio_patching.tar.xz Unpack into your kernel-src, run script right from that dir ( all explained in the README ). Btw: Someone took my patch and commited it partly to alsa, so it might show up upstream anytime soon. Jens
  2. jensverwiebe

    Line 6 With Linux?

    Hi Rodney, you got pm. As you use another kernel as me we must first sort out what fails, perhaps the suggestions i made already helped you. If so just edit the linked script/patch package accordingly and all should go well. If not pls leave a log here so i can judge the problem. I'am sure its just due the where modules/devices added in between. Jens
  3. jensverwiebe

    Line 6 With Linux?

    I made this just for safety, in case you have a specialized bootconfig in the active kernel. Such can be using hardwaretimers or other relevant settings in alsa. It makes sure the snd_usb is configured same as your active kernel. EDIT: just saw: echo "Compiling with echo $MAKEOPTS threads" should read echo "Compiling with $MAKEOPTS threads" Late night cp/paster error, but not functional relevant. Jens
  4. jensverwiebe

    Line 6 With Linux?

    @ Shemeshg I pm'ed you a bashscript to automate the patching/compiling/modulereplace. All patches and the modified makefile is included. Just unpack in kernel sourcedir and run. Pls test. Unfortunately i still could not catch an expert on the usbrate thingie, so as long as we must patch this is more convenient at least. Only you must get the desired kernel src still,, i tested with 4.4.119 ( wget -c https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.119.tar.gz ) Cheers ... Jens
  5. jensverwiebe

    Line 6 With Linux?

    Hi Shemeshg Perhaps i was not clear enough. If you change the kernel (-headers), you have always to recompile the module else you break the dependencies. KVERSION = $(shell uname -r) assures you link to the active one. You may have just copied the former compiled snd_usb_audio to 4.4.116, this will not work. Syslog with `tail -f` notificatien implies this. What can work is using a newer or older linux/sound/usb as long as you compile it against KVERSION. This may give you an advantage in fixed components, but also may break some other if it also depends on other sound changes. So staying in the 4.4.xxx is a bit safer. I tested up to 4.10.xxx will work also, but does not give benefits for helix. ( but for the other line6 drivers ) Matching the source to KVERSION is indeed the best option, as you get backported stuff/fixes too. Hope this clarifies it .... Jens
  6. jensverwiebe

    Line 6 With Linux?

    Initially you would not need to get a new kernel source, if snd_usb did not change. If in doubt, check the changelog. The makefile i posted always uses : KVERSION = $(shell uname -r) aka uses the headers of the active kernel. So just recompile that part. If you absolutely need to renew all: Actual: https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.116.tar.gz The kernels are always to find in : https://www.kernel.org/pub/linux/kernel/v4.x/ Or you clone the main repo ( git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ) and checkout the wished tag and patch it. ( you can also cherrypick sound/usb ) Compile snd_usb_audio like described formerly. Full kernel: Don't forget to check its setup before compile, i use: cp /boot/config-`uname -r` .config make oldconfig make menuconfig Set lowlatency + timers to 1000Hz + HW timers used ( will be active if the former config was configured like this already ) Then compile typically with: make -j `nproc` LOCALVERSION= deb-pkg Jens
  7. jensverwiebe

    Line 6 With Linux?

    Great you made it :) Yep, avoiding analog wiring is a big quality win. As well is the working midi, which allows you to use the miditemo depending delay timings + patch changes etc.. Just prepare an "all time patch", we need not to change kernels such often ( i hope, ask Intel :P) ) If you like you can post your experience in the alsa mailing lists too. More users rise the interest for developing a full implementation. Sidenote: using pulse-jacksink can disturb jack freewheeling which is for example used by Ardour (stem-) export. If you experience oddness, just deactivate for this usecase. ( pactl unload-module module-jack-sink / pactl load-module module-jack-sink channels=2 ), i use prepared scripts for load/unload in the linux mint cinnamon scripts applet ) Cheers ... Jens
  8. jensverwiebe

    Line 6 With Linux?

    Hi The steps i made are very simple atm., also i only recompile the snd_usb_audio.ko for the runninng kernel. I'am awaiting some hints from alsa devs to make the ep->freqn requested in the right way, but thats not yet solved. Up to now all voodoo i tried did not gave me better results ( such as sync_endpoint redirection etc. ) So ....either get your kernel from the precompiled repo, or git clone the dedicated tag, up to you.( latter is better to diff later ) My diff: diff --git a/sound/usb/format.c b/sound/usb/format.c index 2c44386..1c0107d 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -298,6 +298,20 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip, goto err; } + /* + * Line6 HELIX does not respond to sample rate + * query requests. The only valid rate is 48000. + */ + if (chip->usb_id == USB_ID(0x0e41, 0x4244)) { + fp->nr_rates = 1; + fp->rate_min = 48000; + fp->rate_max = 48000; + fp->rates = SNDRV_PCM_RATE_48000; + fp->rate_table = kmalloc(sizeof(int), GFP_KERNEL); + fp->rate_table[0] = 48000; + return 0; + } + /* get the number of sample rates first by only fetching 2 bytes */ ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE, USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index c90607e..026095a 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -888,6 +888,8 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep, if (snd_usb_get_speed(ep->chip->dev) == USB_SPEED_FULL) ep->freqn = get_usb_full_speed_rate(rate); + else if (USB_ID(0x0e41, 0x4244)) + ep->freqn = get_usb_high_speed_rate(rate + 5); // ugly helix hack else ep->freqn = get_usb_high_speed_rate(rate); Then i recompile form linux/sound/usb directory with a modified makefile: KVERSION = $(shell uname -r) snd-usb-audio-objs := card.o \ clock.o \ endpoint.o \ format.o \ helper.o \ mixer.o \ mixer_quirks.o \ mixer_scarlett.o \ pcm.o \ proc.o \ quirks.o \ stream.o snd-usbmidi-lib-objs := midi.o # Toplevel Module Dependency obj-m += snd-usb-audio.o snd-usbmidi-lib.o all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean The resulting snd-usb-audio.ko goes to: /lib/modules/<your_actual_kernel_version>/kernel/sound/usb Unload the former module: sudo rmmod snd_usb_audio Then either plugin your helix or if already done : sudo modprobe snd_usb_audio Thats it. The line where i add 5Hz to the usbrate may vary for you, i recommend to have another usb-interface plugged it the same port and get the runtime rate from /proc/asound/<other_interface>/stream0 ( sound must be played thru this to see the runtime parameters ) I will post when i have a clean solution and will try to bring this to the kernel backports then. Btw: 'am not sure if the OSX behavior can be called fully class compliant, but at least there you can get 48kHz without an additional driver. Other interfaces at least allow to read and set the samplerate in a not vendorspecific way. Would be nice Line6 could reach out for possible Linux users/buyers here ;) The final goal would be to have this on alsa too + later can choose the other available samplerates. Hope never dies :) Does this help ? ... Jens
  9. jensverwiebe

    Line 6 With Linux?

    Hi folks I recently got a Line6 Helix LT and saw it is kinda usb-compliant at least on the mac. So i gave it a try on linux and got it run. I had to hack alsa to not try to read or set the fixed default 48kHz samplerate. Then i still had small soundglitches cause the usbrate does not follow, so i made a hack with an arbitrary value read from another working usb interface here too. ( implicite feedback not available ? ) Result: it works fine with jack ( incl. midi ), setting up all 8 in/out and also aggregate it via alsa_in/alsa_out with my focusrite scarlett 6i6. Todo: Pure alsa does not work atm as i don't get the control interface setup to have a mixer, which should be a passthrough like on mac annyway. When i have time i wanna get rid of my arbitrary hack to read out properly the usb rate from the interface3 feedback endpoint. Perhaps it can be calculated other way or a timer is needed, not sure atm.. Roundup: Helix (LT) is somewhat compliant on linux alsa, but needs some quirks. Perhaps such could be better supported in next firmware update. /proc/asound/HELIX/stream0: LINE 6 HELIX at usb-0000:07:00.0-2, high speed : USB Audio Playback: Status: Running Interface = 2 Altset = 1 Packet Size = 224 Momentary freq = 48005 Hz (0x6.0029) Interface 2 Altset 1 Format: S32_LE Channels: 8 Endpoint: 3 OUT (ASYNC) Rates: 48000 Data packet interval: 125 us Capture: Status: Running Interface = 3 Altset = 1 Packet Size = 224 Momentary freq = 48005 Hz (0x6.0029) Interface 3 Altset 1 Format: S32_LE Channels: 8 Endpoint: 3 IN (ASYNC) Rates: 48000 Data packet interval: 125 us Cheers ... Jens
×