You are not logged in.

#26 2011-08-12 04:21:16

Durden
Member
Registered: 2011-06-19
Posts: 261

Re: Logitech HD Webcam C270 - Chipmunk Sound

Nevermind. I just added uvcvideo to my modules in rc.conf and now it works fine

Offline

#27 2011-08-12 04:27:25

Durden
Member
Registered: 2011-06-19
Posts: 261

Re: Logitech HD Webcam C270 - Chipmunk Sound

And now it stopped working again. So strange.

Offline

#28 2011-08-12 12:56:58

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

Durden wrote:

Could someone point me to instructions on how to apply this patch? Something int he wiki maybe? I can't seem to find out how.

The easiest way to do this is through ABS (Arch Build System). First install ABS (pacman -S abs), then run it as root to get the necessary packages in /var/abs. Then, copy the linux source to your directory of choice. Say you have an abs folder in your home folder- you would do

cp -r /var/abs/core/linux /home/user/abs

(The kernel is now called linux instead of kernel26 like it used to be called) Or, just open a file manager and move it that way.

Then, you need to go into the directory you copied over (via file manager). Copy the patch you find in the link above in a file named, for example, mic.patch, and place it in the /home/user/abs/linux directory you copied over. Open a terminal and run

lsusb

and find your webcam. For example, my relevant line is:

Bus 002 Device 002: ID 046d:0809 Logitech, Inc. Webcam Pro 9000

Note the 046d:0809- that is the number you need to change TO in the patch. For example, my patch file has:

+    /* Logitech Webcam Pro 9000 */
+    { USB_DEVICE(0x046d, 0x0809), .driver_info = USB_QUIRK_RESET_RESUME },
+

while yours might be totally different if its a different webcam. This is the most important part really- the patch wont do you any good if its not pointing at the right device.

Now, open the PKGBUILD found in the /home/user/abs/linux directory. Also, open a terminal at the /home/user/abs/linux directory location. Add

'mic.patch'

to the source line (take a look at the fix-i915.patch for an example of how to properly write it down, and to make it easy, place it LAST in the source array). Then, you need to generate an md5sum for the patch file and place it in the RIGHT order in the md5sums portion of the PKGBUILD. Go to your terminal, type

md5sum mic.patch

and record (or copy) the md5sum printed out. Paste that md5sum into the md5sums portion of the PKGBUILD where its in the same order it appears in the source list (again, since you likely did it LAST in the sources array as suggested above, you would do the same in the md5sum array). Now, go down to the build portion of the PKGBUILD and BEFORE the if/else statement, place the following:

patch -p1 -i "$srcdir/mic.patch"

and save the PKGBUILD.
Go back to the terminal and run:

makepkg -s

With any luck, it will build (it will take prolly 20 minutes depending on hardware). Once done, you install the package with

pacman -U kernelname.pkg.tar.xz

If you have any issues, let us know. You might want to check the ABS wiki to get more familiar with the process- ABS is very useful at times.

Last edited by GSF1200S (2011-08-12 13:07:29)

Offline

#29 2011-08-12 14:11:23

Durden
Member
Registered: 2011-06-19
Posts: 261

Re: Logitech HD Webcam C270 - Chipmunk Sound

Awesome instructions! Thank you very much. I will give it a try smile

Offline

#30 2011-08-17 17:33:15

jappel
Member
Registered: 2009-04-09
Posts: 14

Re: Logitech HD Webcam C270 - Chipmunk Sound

Dear fellow Chipmunks,

thank you for the patch and GSF1200S, thanks for the instructions.

I waited for the kernel update 3.0.2 with the hope that the fix would be included, but at least for the logitech c250 the problem is still there - the proposed patch here fixes it. Is 3.0.2 working for anyone? How to find out when the patch gets into a kernel-release?

Offline

#31 2011-08-18 04:05:07

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

Im glad the above helped some of you, but I wanted to make an addition to the above so none of you guys encounter issues:
1) Make sure you also install the corresponding linux-headers tar.xz that is generated when you compile the latest kernel via ABS- if you dont, you can have issues getting various programs to compile or various drivers to work (e.g. nvidia).
2) You may not want to have to recompile the kernel everytime a new one is replaced since, especially on older hardware, that can take quite some time. Consider only bumping up to a new release every 2 or 3 kernel releases (so you dont get too behind on various other packages requiring the newest kernel as a dependency); open /etc/pacman.conf and add linux and linux-headers to the IgnorePkg line: you can manually (pacman -U) a new built kernel in whenever you want, but -Syu will ignore any newer kernel upgrades (and will warn you that its doing so).
3) I highly suggest if you have a dual core or greater machine to heed the following advice from the kernel building wiki (https://wiki.archlinux.org/index.php/Kernel_Compilation):

Compiling with multiple CPUs

To tell the compiler to use all CPUs during compile use the -j<number> make flag. The number should be n+1 where n is the number of your CPUs.

This example is for a 2 core system (2+1=3):
File: /etc/makepkg.conf

...
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j3"
...

Im on an i7, and my compiling time for the kernel went from 30 minutes to a little over 10 by changing from -j2 to -j5- something to keep in mind smile

Offline

#32 2011-08-19 19:56:17

ras0ir
Member
From: Ankara/Turkey
Registered: 2008-06-20
Posts: 65
Website

Re: Logitech HD Webcam C270 - Chipmunk Sound

btw, you dont have to build whole kernel source, you can just build a single module, i'll post soon how to do it.

Offline

#33 2011-08-19 19:58:21

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

ras0ir wrote:

btw, you dont have to build whole kernel source, you can just build a single module, i'll post soon how to do it.

Be nice to know how to do that..

Is it possible to build one module and use it with the binary kernel package? Kinda annoying rebuilding everytime a new kernel is released, but I dont want to get into issues with other packages being held back as a result of holding onto an older kernel...

Offline

#34 2011-08-19 20:30:46

ras0ir
Member
From: Ankara/Turkey
Registered: 2008-06-20
Posts: 65
Website

Re: Logitech HD Webcam C270 - Chipmunk Sound

Here's the steps:
1. Download kernel source from kernel.org (e.g linux-3.0.3.tar.bz2) and unpack it.
2. cd linux-3.x.x
3. modify the source (use your patch, or modify code by hand.)
4.

sed -ri 's|^(SUBLEVEL =).*|\1|' Makefile

(see PKGBUILD for linux package for additional info)
5. zcat /proc/config.gz > .config
6. make oldconfig
7. make prepare
8. make modules_prepare
9. make SUBDIRS=scripts/mod
10. make SUBDIRS=drivers/usb/core modules

At this time your module should be ready. Check it:

11. change directory  to  drivers/usb/core and check if usbcore.ko is there. (modinfo usbcore.ko) and gzip it
if you see  "vermagic:       3.0-ARCH SMP preempt mod_unload" in modinfo's output, your module is ready to use. You can copy it to /lib/modules/3.0-ARCH/kernel/drivers/usb/core/
12. rebuild initrd (as you may need usbcore on boot)
13. reboot and PRAY tongue

Last edited by ras0ir (2011-08-19 20:31:16)

Offline

#35 2011-08-20 13:26:36

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Logitech HD Webcam C270 - Chipmunk Sound

Can this patch be incorporated into the main kernel?


@ras0ir thanks - that looks very useful. Just one note: your #3 isn't a command like most of the others. Some people might not be sure how to do that. Usually it's better to list the command. Just a nitpick i have about linux doc - don't just tell, tell how. ;-)

Last edited by userlander (2011-08-20 13:32:37)

Offline

#36 2011-08-22 08:15:05

paulchain
Member
Registered: 2011-08-22
Posts: 7

Re: Logitech HD Webcam C270 - Chipmunk Sound

I tried like yall said to patch the kernel and everything went fine till i did the makepkg -s
it got to the part where it was patching the i915 and crashes and says soemthing about the file containing garbage.  I dont know what happened.

Offline

#37 2011-08-22 15:30:52

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

paulchain wrote:

I tried like yall said to patch the kernel and everything went fine till i did the makepkg -s
it got to the part where it was patching the i915 and crashes and says soemthing about the file containing garbage.  I dont know what happened.

Please post your exact error message from makepkg. Are you sure you have the md5sums in the right order?

Offline

#38 2011-08-22 15:34:19

paulchain
Member
Registered: 2011-08-22
Posts: 7

Re: Logitech HD Webcam C270 - Chipmunk Sound

[paul@ArchLinux linux]$ makepkg -s
==> Making package: linux 3.0.3-1 (Mon Aug 22 10:32:43 CDT 2011)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Found linux-3.0.tar.bz2
  -> Found patch-3.0.3.gz
  -> Found config
  -> Found config.x86_64
  -> Found linux.preset
  -> Found fix-i915.patch
  -> Found change-default-console-loglevel.patch
  -> Found mic.patch
==> Validating source files with md5sums...
    linux-3.0.tar.bz2 ... Passed
    patch-3.0.3.gz ... Passed
    config ... Passed
    config.x86_64 ... Passed
    linux.preset ... Passed
    fix-i915.patch ... Passed
    change-default-console-loglevel.patch ... Passed
    mic.patch ... Passed
==> Extracting Sources...
  -> Extracting linux-3.0.tar.bz2 with bsdtar
  -> Extracting patch-3.0.3.gz with gzip
==> Starting build()...
patching file Documentation/virtual/lguest/lguest.c
patching file Makefile
patching file arch/alpha/kernel/time.c
patching file arch/arm/mach-pxa/cm-x300.c
patching file arch/cris/arch-v10/drivers/sync_serial.c
patching file arch/cris/arch-v10/kernel/irq.c
patching file arch/cris/include/asm/thread_info.h
patching file arch/parisc/include/asm/atomic.h
patching file arch/parisc/include/asm/futex.h
patching file arch/parisc/include/asm/unistd.h
patching file arch/parisc/kernel/syscall_table.S
patching file arch/powerpc/kernel/crash.c
patching file arch/powerpc/kernel/prom_init.c
patching file arch/powerpc/kernel/time.c
patching file arch/powerpc/platforms/pseries/dtl.c
patching file arch/powerpc/platforms/pseries/hvconsole.c
patching file arch/powerpc/platforms/pseries/kexec.c
patching file arch/powerpc/platforms/pseries/lpar.c
patching file arch/powerpc/platforms/pseries/plpar_wrappers.h
patching file arch/sparc/include/asm/bitops_64.h
patching file arch/sparc/include/asm/elf_64.h
patching file arch/sparc/include/asm/hypervisor.h
patching file arch/sparc/include/asm/spitfire.h
patching file arch/sparc/include/asm/tsb.h
patching file arch/sparc/include/asm/xor_64.h
patching file arch/sparc/kernel/cpu.c
patching file arch/sparc/kernel/cpumap.c
patching file arch/sparc/kernel/ds.c
patching file arch/sparc/kernel/entry.h
patching file arch/sparc/kernel/head_64.S
patching file arch/sparc/kernel/hvapi.c
patching file arch/sparc/kernel/hvcalls.S
patching file arch/sparc/kernel/kernel.h
patching file arch/sparc/kernel/ktlb.S
patching file arch/sparc/kernel/mdesc.c
patching file arch/sparc/kernel/pcr.c
patching file arch/sparc/kernel/perf_event.c
patching file arch/sparc/kernel/setup_64.c
patching file arch/sparc/kernel/sparc_ksyms_64.c
patching file arch/sparc/kernel/sstate.c
patching file arch/sparc/kernel/unaligned_64.c
patching file arch/sparc/kernel/vmlinux.lds.S
patching file arch/sparc/lib/Makefile
patching file arch/sparc/lib/NG2page.S
patching file arch/sparc/lib/NGpage.S
patching file arch/sparc/lib/ffs.S
patching file arch/sparc/lib/hweight.S
patching file arch/sparc/mm/init_64.c
patching file arch/x86/include/asm/msr-index.h
patching file arch/x86/kernel/cpu/intel.c
patching file arch/x86/kernel/relocate_kernel_32.S
patching file arch/x86/kernel/relocate_kernel_64.S
patching file arch/x86/oprofile/backtrace.c
patching file arch/x86/xen/Makefile
patching file arch/x86/xen/enlighten.c
patching file arch/x86/xen/vga.c
patching file arch/x86/xen/xen-ops.h
patching file arch/xtensa/kernel/ptrace.c
patching file block/blk-core.c
patching file block/blk-exec.c
patching file crypto/md5.c
patching file drivers/block/cciss.h
patching file drivers/char/random.c
patching file drivers/firewire/core-cdev.c
patching file drivers/firmware/sigma.c
patching file drivers/gpu/drm/drm_edid.c
patching file drivers/gpu/drm/i915/i915_dma.c
patching file drivers/gpu/drm/i915/i915_irq.c
patching file drivers/gpu/drm/i915/intel_display.c
patching file drivers/gpu/drm/i915/intel_panel.c
patching file drivers/gpu/drm/i915/intel_ringbuffer.c
patching file drivers/gpu/drm/radeon/atombios_dp.c
patching file drivers/gpu/drm/radeon/radeon_combios.c
patching file drivers/gpu/drm/radeon/radeon_connectors.c
patching file drivers/gpu/drm/radeon/radeon_device.c
patching file drivers/gpu/drm/radeon/radeon_display.c
patching file drivers/gpu/drm/radeon/radeon_encoders.c
patching file drivers/gpu/drm/radeon/radeon_i2c.c
patching file drivers/gpu/drm/radeon/radeon_mode.h
patching file drivers/gpu/drm/radeon/radeon_pm.c
patching file drivers/hwmon/ibmaem.c
patching file drivers/infiniband/ulp/srp/ib_srp.c
patching file drivers/isdn/i4l/isdn_net.c
patching file drivers/md/dm-io.c
patching file drivers/md/dm-mpath.c
patching file drivers/md/dm-snap-persistent.c
patching file drivers/md/dm.c
patching file drivers/misc/Kconfig
patching file drivers/mmc/host/sdhci-esdhc-imx.c
patching file drivers/net/Makefile
patching file drivers/net/bonding/bond_main.c
patching file drivers/net/bonding/bond_sysfs.c
patching file drivers/net/e1000e/lib.c
patching file drivers/net/gianfar_ptp.c
patching file drivers/net/ifb.c
patching file drivers/net/jme.c
patching file drivers/net/macvlan.c
patching file drivers/net/niu.c
patching file drivers/net/phy/dp83640.c
patching file drivers/net/r8169.c
patching file drivers/net/sis190.c
patching file drivers/net/tun.c
patching file drivers/net/veth.c
patching file drivers/net/wan/hdlc_fr.c
patching file drivers/net/wireless/airo.c
patching file drivers/net/wireless/ath/ath5k/base.c
patching file drivers/net/wireless/ath/ath9k/ar9002_hw.c
patching file drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
patching file drivers/net/wireless/ath/ath9k/ar9003_hw.c
patching file drivers/net/wireless/ath/ath9k/ar9003_mac.c
patching file drivers/net/wireless/ath/ath9k/ar9003_phy.h
patching file drivers/net/wireless/ath/ath9k/hw.c
patching file drivers/net/wireless/ath/ath9k/hw.h
patching file drivers/net/wireless/ath/ath9k/init.c
patching file drivers/net/wireless/ath/ath9k/mac.c
patching file drivers/net/wireless/ath/ath9k/pci.c
patching file drivers/net/wireless/hostap/hostap_main.c
patching file drivers/net/wireless/iwlegacy/iwl-3945.c
patching file drivers/net/wireless/iwlegacy/iwl-4965.c
patching file drivers/net/wireless/iwlwifi/iwl-5000.c
patching file drivers/net/wireless/iwlwifi/iwl-core.h
patching file drivers/net/wireless/iwlwifi/iwl-power.c
patching file drivers/net/wireless/rt2x00/rt2800lib.c
patching file drivers/net/wireless/rt2x00/rt2800pci.c
patching file drivers/net/wireless/rt2x00/rt2x00mac.c
patching file drivers/net/wireless/rtlwifi/pci.c
patching file drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
patching file drivers/pci/pci.c
patching file drivers/pci/quirks.c
patching file drivers/platform/x86/asus-wmi.c
patching file drivers/rtc/interface.c
patching file drivers/rtc/rtc-tegra.c
patching file drivers/scsi/hpsa.h
patching file drivers/scsi/libsas/sas_expander.c
patching file drivers/scsi/mpt2sas/mpt2sas_base.c
patching file drivers/scsi/mpt2sas/mpt2sas_base.h
patching file drivers/scsi/mpt2sas/mpt2sas_ctl.c
patching file drivers/scsi/mpt2sas/mpt2sas_debug.h
patching file drivers/scsi/mpt2sas/mpt2sas_scsih.c
patching file drivers/scsi/mpt2sas/mpt2sas_transport.c
patching file drivers/scsi/pmcraid.c
patching file drivers/scsi/scsi_devinfo.c
patching file drivers/scsi/scsi_lib.c
patching file drivers/scsi/ses.c
patching file drivers/scsi/sr.c
patching file drivers/scsi/sr.h
patching file drivers/staging/ath6kl/os/linux/ar6000_drv.c
patching file drivers/staging/ath6kl/os/linux/cfg80211.c
patching file drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
patching file drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
patching file drivers/staging/comedi/comedi_fops.c
patching file drivers/staging/hv/channel.c
patching file drivers/staging/hv/channel_mgmt.c
patching file drivers/staging/hv/connection.c
patching file drivers/staging/hv/netvsc.c
patching file drivers/staging/hv/rndis_filter.c
patching file drivers/staging/hv/storvsc.c
patching file drivers/staging/hv/storvsc_drv.c
patching file drivers/staging/rtl8192e/r8192E_core.c
patching file drivers/staging/rtl8192u/r819xU_firmware.c
patching file drivers/staging/usbip/vhci_hcd.c
patching file drivers/tty/hvc/hvc_console.c
patching file drivers/tty/n_gsm.c
patching file drivers/tty/serial/8250.c
patching file drivers/tty/serial/Kconfig
patching file drivers/usb/class/usbtmc.c
patching file drivers/usb/core/config.c
patching file drivers/usb/host/ehci-hcd.c
patching file drivers/usb/host/ehci-hub.c
patching file drivers/usb/host/ehci-q.c
patching file drivers/usb/host/ehci.h
patching file drivers/usb/host/pci-quirks.c
patching file drivers/usb/host/xhci.c
patching file drivers/usb/musb/musb_core.c
patching file drivers/usb/musb/musb_gadget.c
patching file drivers/usb/serial/ftdi_sio.c
patching file drivers/usb/serial/option.c
patching file drivers/usb/serial/pl2303.c
patching file drivers/usb/serial/pl2303.h
patching file drivers/usb/serial/qcserial.c
patching file drivers/usb/storage/unusual_devs.h
patching file drivers/watchdog/shwdt.c
patching file fs/cifs/cifsfs.c
patching file fs/cifs/dir.c
patching file fs/cifs/inode.c
patching file fs/cifs/transport.c
patching file fs/ecryptfs/inode.c
patching file fs/ecryptfs/keystore.c
patching file fs/ecryptfs/main.c
patching file fs/ecryptfs/read_write.c
patching file fs/ext3/namei.c
patching file fs/ext3/xattr.c
patching file fs/ext4/ext4.h
patching file fs/ext4/extents.c
patching file fs/ext4/mballoc.c
patching file fs/ext4/namei.c
patching file fs/gfs2/ops_fstype.c
patching file fs/nfs/delegation.c
patching file fs/nfs/dir.c
patching file fs/nfs/nfs4filelayout.c
patching file fs/nfs/nfs4proc.c
patching file fs/nfs/nfs4xdr.c
patching file fs/nfs/pnfs.c
patching file fs/nfs/pnfs.h
patching file fs/nfsd/nfs4state.c
patching file fs/proc/base.c
patching file include/drm/drm_crtc.h
patching file include/drm/i915_drm.h
patching file include/linux/cryptohash.h
patching file include/linux/firewire-cdev.h
patching file include/linux/if.h
patching file include/linux/mm.h
patching file include/linux/netdevice.h
patching file include/linux/nfs_fs.h
patching file include/linux/nfs_xdr.h
patching file include/linux/random.h
patching file include/net/ipv6.h
patching file include/net/secure_seq.h
patching file include/net/transp_v6.h
patching file include/xen/interface/xen.h
patching file ipc/sem.c
patching file kernel/events/core.c
patching file kernel/futex.c
patching file kernel/trace/trace.h
patching file kernel/trace/trace_events.c
patching file kernel/trace/trace_events_filter.c
patching file lib/Makefile
patching file lib/md5.c
patching file lib/xz/xz_private.h
patching file mm/backing-dev.c
patching file mm/memcontrol.c
patching file mm/memory.c
patching file mm/oom_kill.c
patching file mm/vmalloc.c
patching file net/8021q/vlan_dev.c
patching file net/atm/br2684.c
patching file net/bluetooth/bnep/netdev.c
patching file net/bridge/br_private.h
patching file net/bridge/br_stp.c
patching file net/core/Makefile
patching file net/core/ethtool.c
patching file net/core/link_watch.c
patching file net/core/pktgen.c
patching file net/core/secure_seq.c
patching file net/dccp/ipv4.c
patching file net/dccp/ipv6.c
patching file net/ethernet/eth.c
patching file net/ipv4/devinet.c
patching file net/ipv4/gre.c
patching file net/ipv4/icmp.c
patching file net/ipv4/igmp.c
patching file net/ipv4/inet_hashtables.c
patching file net/ipv4/inetpeer.c
patching file net/ipv4/ip_output.c
patching file net/ipv4/ipmr.c
patching file net/ipv4/netfilter/nf_nat_proto_common.c
patching file net/ipv4/route.c
patching file net/ipv4/tcp_ipv4.c
patching file net/ipv6/af_inet6.c
patching file net/ipv6/inet6_hashtables.c
patching file net/ipv6/ip6_output.c
patching file net/ipv6/tcp_ipv6.c
patching file net/ipv6/udp.c
patching file net/l2tp/l2tp_eth.c
patching file net/mac80211/iface.c
patching file net/mac80211/mlme.c
patching file net/netfilter/ipvs/ip_vs_ctl.c
patching file net/sched/sch_sfq.c
patching file net/socket.c
patching file net/sunrpc/svc_xprt.c
patching file net/wireless/reg.c
patching file net/xfrm/xfrm_algo.c
patching file security/apparmor/domain.c
patching file security/apparmor/lsm.c
patching file sound/core/pcm_compat.c
patching file sound/core/timer.c
patching file sound/pci/hda/patch_realtek.c
patching file sound/pci/oxygen/xonar_pcm179x.c
patching file sound/soc/codecs/sgtl5000.c
patching file sound/soc/davinci/davinci-vcif.c
patching file sound/soc/samsung/jive_wm8750.c
patching file sound/soc/soc-core.c
patching file sound/soc/tegra/tegra_pcm.c
patching file sound/soc/tegra/tegra_wm8903.c
patching file sound/usb/caiaq/audio.c
patching file sound/usb/caiaq/input.c
patching file sound/usb/endpoint.c
patching file sound/usb/mixer.c
patching file sound/usb/mixer.h
patching file tools/perf/Makefile
patching file tools/perf/util/config.c
patching file tools/perf/util/header.c
patching file tools/perf/util/session.c
patching file tools/perf/util/session.h
patching file drivers/gpu/drm/i915/intel_tv.c
Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patch: **** Only garbage was found in the patch input.
==> ERROR: A failure occurred in build().
    Aborting...
[paul@ArchLinux linux]$ 

Offline

#39 2011-08-23 17:05:29

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Logitech HD Webcam C270 - Chipmunk Sound

getting this error. took out the 1.7.1 and got some 'unexpected end of line' error or some such.

patching file drivers/gpu/drm/i915/intel_tv.c
Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patching file drivers/usb/core/quirks.c
patch: **** malformed patch at line 16: 1.7.1

==> ERROR: A failure occurred in build().
    Aborting...

Offline

#40 2011-08-23 20:53:49

paulchain
Member
Registered: 2011-08-22
Posts: 7

Re: Logitech HD Webcam C270 - Chipmunk Sound

Either some steps on how to compile this patch into the kernel was left off or it just doesn't work anymore because everyone now seems to be having compiling errors.

Offline

#41 2011-08-23 21:21:56

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

The above steps worked for me and others; I am trying to compile the vanilla kernel without the webcam patch now- it appears the i915 patch is the failure and not the webcam patch. I dont know what that patch accomplishes, but if you dont have a 915 chipset you should be able to just omit that patch and md5sum and it should build fine. I will edit this post once I get a result..

**EDIT** Read the output wrong- it is indeed the webcam patch. Building now to see..

EDIT2** Works for me:

patching file tools/perf/util/session.h
patching file drivers/gpu/drm/i915/intel_tv.c
Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patching file drivers/usb/core/quirks.c
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/x86/kernel/asm-offsets.s
...

Make sure your patch looks like mine does:

---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 81ce6a8..6c593f9 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -41,6 +41,9 @@ static const struct usb_device_id usb_quirk_list[] = {
 	/* Logitech Harmony 700-series */
 	{ USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
 
+	/* Logitech Webcam Pro 9000 */
+	{ USB_DEVICE(0x046d, 0x0809), .driver_info = USB_QUIRK_RESET_RESUME },
+
 	/* Philips PSC805 audio device */
 	{ USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
 
-- 
1.7.1

Please note it must look the same as above, except you change the stuff next to the three vertical plus signs. As in my above instructions: { USB_DEVICE(0x046d, 0x0809), .driver_in... needs to contain the unique ID printed out by your webcam using the command

lsusb

prefixed by the 0x

The fact that these patches are giving you errors at line 17 suggests either the { USB_Device line is wrong, or you dont have all the lines in the patch. If this doesnt help you get it to build, respond to my post by putting your entire webcam patch file in code tags and also the output of lsusb (ensure your webcam is plugged in).

Last edited by GSF1200S (2011-08-23 21:37:59)

Offline

#42 2011-08-23 21:50:26

paulchain
Member
Registered: 2011-08-22
Posts: 7

Re: Logitech HD Webcam C270 - Chipmunk Sound

Well that seems to be my problem my mic.patch file had only the lines wiht the + instead of the whole thing.  For some reason I thought the only things I should have included in the patch file were those.  I'm redoing it now with the entire thing and changed my usb device id as specified by lsusb. And after just looking at the compile window i can see its working :-) so for anyone getting an error more than likely as GSF1200S stated either the device id is wrong in your patch or like me you didn't copy and paste the whole patch file.  Thanks again GSF1200S

Offline

#43 2011-08-23 22:00:21

paulchain
Member
Registered: 2011-08-22
Posts: 7

Re: Logitech HD Webcam C270 - Chipmunk Sound

I am courious though I installed Arch to actually "learn" Linux do you mind telling me how you were able to look at the output file I gave you and determin the problem.  I need to learn these things so I can self diagnose problems more efficiant.

Offline

#44 2011-08-23 22:00:33

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

paulchain wrote:

Well that seems to be my problem my mic.patch file had only the lines wiht the + instead of the whole thing.  For some reason I thought the only things I should have included in the patch file were those.  I'm redoing it now with the entire thing and changed my usb device id as specified by lsusb. And after just looking at the compile window i can see its working :-) so for anyone getting an error more than likely as GSF1200S stated either the device id is wrong in your patch or like me you didn't copy and paste the whole patch file.  Thanks again GSF1200S

I did the same thing the first time I patched lxterminal-git trying to remove window hints. It seems the documentation is a little sparse for diff patching, though it is mentioned and some examples are given. Good to hear it worked and no problem smile

If anyone else has an issue, please post here with your patch file and the printout of lsusb. Until this situation is resolved in the mainline kernel (which is supposedly supposed to occur for many webcams in the next release, so well see), I will bump this thread confirming the patch works for me on any new kernels..

Offline

#45 2011-08-23 22:07:56

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

paulchain wrote:

I am courious though I installed Arch to actually "learn" Linux do you mind telling me how you were able to look at the output file I gave you and determin the problem.  I need to learn these things so I can self diagnose problems more efficiant.

I am by no means a master at diff patching- I learned the basics to patch a terminal for no window resize hints (for use with pytyle), and to fix this problem. By looking at the output, i just noticed that indeed the webcam patch was failing. I noted it mentioned line 17, which incidentally is the same line that contains the ID of your webcam as stated by lsusb. I then figured that your patch either didnt have a line 17 or it contained the wrong information, so I figured id have you post it and see if I could go from there. I copied that patch directly from a bug report filed against the kernel, and simply modified it to match my webcam. I learned about patching via PKGBUILD/ABS reading a few wiki's and doing some trial and error.

I have found in Arch that I never run into Arch problems per se- it is always issues with upstream (upstream refers to development of the package/library before the arch packagers package them for Arch). This is an upstream issue with the Linux kernel, for example. Ubuntu and many other distros patch the hell out of upstream packages to keep things running smooth, but then that sort of makes sense on a fixed release system. In rolling release (as Arch is), its far too much time invested for a package that will be replaced shortly anyways. Arch devs/packagers prefer to leave stuff vanilla.

Offline

#46 2011-08-24 14:56:06

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Logitech HD Webcam C270 - Chipmunk Sound

I took out what I thought were extraneous lines, too. I guess that was the problem. Will try again later, thanks for all your work and documentation on this.

Offline

#47 2011-08-25 20:53:09

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Logitech HD Webcam C270 - Chipmunk Sound

this is with the 915 chipset patch and md5sum taken out of PKGBUILD. I had an error before taking it out, too:

...
patching file security/apparmor/domain.c
patching file security/apparmor/lsm.c
patching file sound/core/pcm_compat.c
patching file sound/core/timer.c
patching file sound/pci/hda/patch_realtek.c
patching file sound/pci/oxygen/xonar_pcm179x.c
patching file sound/soc/codecs/sgtl5000.c
patching file sound/soc/davinci/davinci-vcif.c
patching file sound/soc/samsung/jive_wm8750.c
patching file sound/soc/soc-core.c
patching file sound/soc/tegra/tegra_pcm.c
patching file sound/soc/tegra/tegra_wm8903.c
patching file sound/usb/caiaq/audio.c
patching file sound/usb/caiaq/input.c
patching file sound/usb/endpoint.c
patching file sound/usb/mixer.c
patching file sound/usb/mixer.h
patching file tools/perf/Makefile
patching file tools/perf/util/config.c
patching file tools/perf/util/header.c
patching file tools/perf/util/session.c
patching file tools/perf/util/session.h
patching file drivers/gpu/drm/i915/intel_tv.c
Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patching file drivers/usb/core/quirks.c
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/core/quirks.c.rej
==> ERROR: A failure occurred in build().
    Aborting...

here's my mic.patch

---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 81ce6a8..6c593f9 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -41,6 +41,9 @@ static const struct usb_device_id usb_quirk_list[] = {
     /* Logitech Harmony 700-series */
     { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
 
+    /* Logitech Webcam Pro C310 */
+    { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME },
+
     /* Philips PSC805 audio device */
     { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
 
-- 
1.7.1

Offline

#48 2011-08-26 01:22:45

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Logitech HD Webcam C270 - Chipmunk Sound

userlander wrote:

this is with the 915 chipset patch and md5sum taken out of PKGBUILD. I had an error before taking it out, too:

...
patching file security/apparmor/domain.c
patching file security/apparmor/lsm.c
patching file sound/core/pcm_compat.c
patching file sound/core/timer.c
patching file sound/pci/hda/patch_realtek.c
patching file sound/pci/oxygen/xonar_pcm179x.c
patching file sound/soc/codecs/sgtl5000.c
patching file sound/soc/davinci/davinci-vcif.c
patching file sound/soc/samsung/jive_wm8750.c
patching file sound/soc/soc-core.c
patching file sound/soc/tegra/tegra_pcm.c
patching file sound/soc/tegra/tegra_wm8903.c
patching file sound/usb/caiaq/audio.c
patching file sound/usb/caiaq/input.c
patching file sound/usb/endpoint.c
patching file sound/usb/mixer.c
patching file sound/usb/mixer.h
patching file tools/perf/Makefile
patching file tools/perf/util/config.c
patching file tools/perf/util/header.c
patching file tools/perf/util/session.c
patching file tools/perf/util/session.h
patching file drivers/gpu/drm/i915/intel_tv.c
Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patching file drivers/usb/core/quirks.c
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/core/quirks.c.rej
==> ERROR: A failure occurred in build().
    Aborting...

here's my mic.patch

---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 81ce6a8..6c593f9 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -41,6 +41,9 @@ static const struct usb_device_id usb_quirk_list[] = {
     /* Logitech Harmony 700-series */
     { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
 
+    /* Logitech Webcam Pro C310 */
+    { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME },
+
     /* Philips PSC805 audio device */
     { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
 
-- 
1.7.1

Hmmm, can you post the results of lsusb please? (Just to verify)

Also, how about the contents of drivers/usb/core/quirks.c.rej? It should be in the src folder created in the build directory when running makepkg.

Ill see if I can figure it out based on what line 41 is, etc. Im kind of flying by the wire here since I havent had a similar failure (that I can remember).. You do have an up-to-date system and you have synced ABS right? Just making sure..

**EDIT** Also, 32 or 64 bit kernel? If nothing else, one of us should be able to provide you with a version patched for your webcam- mkinitcpio should take care of the rest when you pacman -U it in..

Last edited by GSF1200S (2011-08-26 01:24:42)

Offline

#49 2011-08-26 21:19:09

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Logitech HD Webcam C270 - Chipmunk Sound

So strange - not sure what's wrong. Everything was up-to-date & synced, but I started over anyway, resyncing ABS and updating pacman -Syu.

copied /var/abs/core/linux to working directory (~/dload/abs/linux), added the mic.patch, added that & md5sum to PKGBUILD, added the other line to PKGBUILD, and still get the error.

Hunk #1 succeeded at 1269 (offset 2 lines).
patching file kernel/printk.c
patching file drivers/usb/core/quirks.c
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/core/quirks.c.rej
==> ERROR: A failure occurred in build().
    Aborting...

x86_64 system.

lsusb:

Bus 001 Device 004: ID 046d:081b Logitech, Inc. Webcam C310

mic.patch:

---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 81ce6a8..6c593f9 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -41,6 +41,9 @@ static const struct usb_device_id usb_quirk_list[] = {
     /* Logitech Harmony 700-series */
     { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
 
+    /* Logitech Webcam Pro 9000 */
+    { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME },
+
     /* Philips PSC805 audio device */
     { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
 
-- 
1.7.1

PKGBUILD:

# $Id: PKGBUILD 130991 2011-07-09 12:23:51Z thomas $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>

pkgbase=linux
pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -ARCH kernel
# pkgname=linux-custom       # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.0
pkgver=${_basekernel}.3
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-${_basekernel}.tar.bz2"
        "ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-${pkgver}.gz"
        # the main kernel config files
        'config' 'config.x86_64'
        # standard config files for mkinitcpio ramdisk
        "${pkgname}.preset"
        'fix-i915.patch'
        'change-default-console-loglevel.patch'
	'mic.patch')
md5sums=('398e95866794def22b12dfbc15ce89c0'
         'e68b37e9a3fb07f21a4673a7d89359c0'
         'fc6aae0fb4d70feff92ec762d29dee45'
         'fd5a1712ddea696eee5255de2d854218'
         'eb14dcfd80c00852ef81ded6e826826a'
         '263725f20c0b9eb9c353040792d644e5'
         '9d3c56a4b999c8bfbd4018089a62f662'
         '2548784068a4bfc43d53cbb7ffd1e014')

build() {
  cd "${srcdir}/linux-${_basekernel}"

  patch -p1 -i "${srcdir}/patch-${pkgver}"

  # add latest fixes from stable queue, if needed
  # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git

  # fix #19234 i1915 display size
  patch -Np1 -i "${srcdir}/fix-i915.patch"

  # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
  # remove this when a Kconfig knob is made available by upstream
  # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
  patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"

  # fix Logitech C310 mic
  patch -p1 -i "$srcdir/mic.patch"

  if [ "${CARCH}" = "x86_64" ]; then
    cat "${srcdir}/config.x86_64" > ./.config
  else
    cat "${srcdir}/config" > ./.config
  fi

quirks.c:

05:17 PM:~/dload/abs/linux/src/linux-3.0/drivers/usb/core $ cat quirks.c
/*
 * USB device quirk handling logic and table
 *
 * Copyright (c) 2007 Oliver Neukum
 * Copyright (c) 2007 Greg Kroah-Hartman <gregkh@suse.de>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, version 2.
 *
 *
 */

#include <linux/usb.h>
#include <linux/usb/quirks.h>
#include "usb.h"

/* List of quirky USB devices.  Please keep this list ordered by:
 * 	1) Vendor ID
 * 	2) Product ID
 * 	3) Class ID
 *
 * as we want specific devices to be overridden first, and only after that, any
 * class specific quirks.
 *
 * Right now the logic aborts if it finds a valid device in the table, we might
 * want to change that in the future if it turns out that a whole class of
 * devices is broken...
 */
static const struct usb_device_id usb_quirk_list[] = {
	/* CBM - Flash disk */
	{ USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME },

	/* HP 5300/5370C scanner */
	{ USB_DEVICE(0x03f0, 0x0701), .driver_info =
			USB_QUIRK_STRING_FETCH_255 },

	/* Creative SB Audigy 2 NX */
	{ USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Logitech Harmony 700-series */
	{ USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },

	/* Philips PSC805 audio device */
	{ USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Artisman Watchdog Dongle */
	{ USB_DEVICE(0x04b4, 0x0526), .driver_info =
			USB_QUIRK_CONFIG_INTF_STRINGS },

	/* Samsung Android phone modem - ID conflict with SPH-I500 */
	{ USB_DEVICE(0x04e8, 0x6601), .driver_info =
			USB_QUIRK_CONFIG_INTF_STRINGS },

	/* Roland SC-8820 */
	{ USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Edirol SD-20 */
	{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },

	/* appletouch */
	{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Avision AV600U */
	{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
	  USB_QUIRK_STRING_FETCH_255 },

	/* Saitek Cyborg Gold Joystick */
	{ USB_DEVICE(0x06a3, 0x0006), .driver_info =
			USB_QUIRK_CONFIG_INTF_STRINGS },

	/* M-Systems Flash Disk Pioneers */
	{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Keytouch QWERTY Panel keyboard */
	{ USB_DEVICE(0x0926, 0x3333), .driver_info =
			USB_QUIRK_CONFIG_INTF_STRINGS },

	/* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
	{ USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },

	/* Broadcom BCM92035DGROM BT dongle */
	{ USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Action Semiconductor flash disk */
	{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
			USB_QUIRK_STRING_FETCH_255 },

	/* SKYMEDI USB_DRIVE */
	{ USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME },

	/* BUILDWIN Photo Frame */
	{ USB_DEVICE(0x1908, 0x1315), .driver_info =
			USB_QUIRK_HONOR_BNUMINTERFACES },

	/* INTEL VALUE SSD */
	{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },

	{ }  /* terminating entry must be last */
};

static const struct usb_device_id *find_id(struct usb_device *udev)
{
	const struct usb_device_id *id = usb_quirk_list;

	for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass ||
			id->driver_info; id++) {
		if (usb_match_device(udev, id))
			return id;
	}
	return NULL;
}

/*
 * Detect any quirks the device has, and do any housekeeping for it if needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{
	const struct usb_device_id *id = usb_quirk_list;

	id = find_id(udev);
	if (id)
		udev->quirks = (u32)(id->driver_info);
	if (udev->quirks)
		dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
				udev->quirks);

	/* For the present, all devices default to USB-PERSIST enabled */
#if 0		/* was: #ifdef CONFIG_PM */
	/* Hubs are automatically enabled for USB-PERSIST */
	if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
		udev->persist_enabled = 1;

#else
	/* In the absence of PM, we can safely enable USB-PERSIST
	 * for all devices.  It will affect things like hub resets
	 * and EMF-related port disables.
	 */
	if (!(udev->quirks & USB_QUIRK_RESET_MORPHS))
		udev->persist_enabled = 1;
#endif	/* CONFIG_PM */
}

Offline

#50 2011-08-26 21:45:34

adrianx
Member
From: South Africa
Registered: 2010-03-22
Posts: 70

Re: Logitech HD Webcam C270 - Chipmunk Sound

I had some problems myself until I copied the patch directly from here - https://bugzilla.kernel.org/attachment.cgi?id=64722

Everything from "Signed-off-by: Oliver Neukum <oneukum@suse.de>" to "1.7.1"

Not sure why it made a difference, but could it have something to do with the BBCode code blocks or character encoding.... I don't know? Maybe the indentation is also important "@@ -41,6 +41,9 @@"?

Last edited by adrianx (2011-08-26 21:57:06)

Offline

Board footer

Powered by FluxBB