Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1a164d7 authored by Markus Grabner's avatar Markus Grabner Committed by Greg Kroah-Hartman
Browse files

Staging: line6: another upstream sync



Everything should be in sync now.

Signed-off-by: default avatarMarkus Grabner <grabner@icg.tugraz.at>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1027f476
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
/*
 * Line6 Linux USB driver - 0.9.0
 * Line6 Linux USB driver - 0.9.1beta
 *
 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
 *
@@ -15,11 +15,9 @@
#include "driver.h"
#include "audio.h"


static int line6_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
static char *line6_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;


/*
	Initialize the Line6 USB audio system.
*/
@@ -39,8 +37,7 @@ int line6_init_audio(struct usb_line6 *line6)
	strcpy(card->id, line6->properties->id);
	strcpy(card->driver, DRIVER_NAME);
	strcpy(card->shortname, line6->properties->name);
	sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name,
		dev_name(line6->ifcdev));  /* 80 chars - see asound.h */
	sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name, dev_name(line6->ifcdev));	/* 80 chars - see asound.h */
	return 0;
}

+1 −4
Original line number Diff line number Diff line
/*
 * Line6 Linux USB driver - 0.9.0
 * Line6 Linux USB driver - 0.9.1beta
 *
 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
 *
@@ -12,13 +12,10 @@
#ifndef AUDIO_H
#define AUDIO_H


#include "driver.h"


extern void line6_cleanup_audio(struct usb_line6 *);
extern int line6_init_audio(struct usb_line6 *);
extern int line6_register_audio(struct usb_line6 *);


#endif
+27 −22
Original line number Diff line number Diff line
/*
 * Line6 Linux USB driver - 0.9.0
 * Line6 Linux USB driver - 0.9.1beta
 *
 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
 *
@@ -19,7 +19,6 @@
#include "pcm.h"
#include "pod.h"


/*
	Find a free URB and submit it.
*/
@@ -28,6 +27,7 @@ static int submit_audio_in_urb(struct snd_line6_pcm *line6pcm)
	int index;
	unsigned long flags;
	int i, urb_size;
	int ret;
	struct urb *urb_in;

	spin_lock_irqsave(&line6pcm->lock_audio_in, flags);
@@ -57,11 +57,13 @@ static int submit_audio_in_urb(struct snd_line6_pcm *line6pcm)
	urb_in->transfer_buffer_length = urb_size;
	urb_in->context = line6pcm;

	if (usb_submit_urb(urb_in, GFP_ATOMIC) == 0)
	ret = usb_submit_urb(urb_in, GFP_ATOMIC);

	if (ret == 0)
		set_bit(index, &line6pcm->active_urb_in);
	else
		dev_err(line6pcm->line6->ifcdev,
			"URB in #%d submission failed\n", index);
			"URB in #%d submission failed (%d)\n", index, ret);

	spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags);
	return 0;
@@ -216,7 +218,7 @@ static void audio_in_callback(struct urb *urb)
		int fsize;
		struct usb_iso_packet_descriptor *fin = &urb->iso_frame_desc[i];

		if (fin->status == -18) {
		if (fin->status == -EXDEV) {
			shutdown = 1;
			break;
		}
@@ -258,6 +260,9 @@ static void audio_in_callback(struct urb *urb)
	if (!shutdown) {
		submit_audio_in_urb(line6pcm);

#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
		if (!(line6pcm->flags & MASK_PCM_IMPULSE))
#endif
			if (test_bit(BIT_PCM_ALSA_CAPTURE, &line6pcm->flags))
				line6_capture_check_period(line6pcm, length);
	}
@@ -272,8 +277,8 @@ static int snd_line6_capture_open(struct snd_pcm_substream *substream)

	err = snd_pcm_hw_constraint_ratdens(runtime, 0,
					    SNDRV_PCM_HW_PARAM_RATE,
					    (&line6pcm->properties->
					     snd_line6_rates));
					    (&line6pcm->
					     properties->snd_line6_rates));
	if (err < 0)
		return err;

@@ -396,8 +401,8 @@ int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
		urb->dev = line6pcm->line6->usbdev;
		urb->pipe =
		    usb_rcvisocpipe(line6pcm->line6->usbdev,
				    line6pcm->
				    ep_audio_read & USB_ENDPOINT_NUMBER_MASK);
				    line6pcm->ep_audio_read &
				    USB_ENDPOINT_NUMBER_MASK);
		urb->transfer_flags = URB_ISO_ASAP;
		urb->start_frame = -1;
		urb->number_of_packets = LINE6_ISO_PACKETS;
+3 −3
Original line number Diff line number Diff line
/*
 * Line6 Linux USB driver - 0.9.0
 * Line6 Linux USB driver - 0.9.1beta
 *
 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
 *
@@ -12,17 +12,17 @@
#ifndef CAPTURE_H
#define CAPTURE_H


#include <sound/pcm.h>

#include "driver.h"
#include "pcm.h"


extern struct snd_pcm_ops snd_line6_capture_ops;

extern void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf,
			       int fsize);
extern void line6_capture_check_period(struct snd_line6_pcm *line6pcm,
				       int length);
extern int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm);
extern int line6_submit_audio_in_all_urbs(struct snd_line6_pcm *line6pcm);
extern void line6_unlink_audio_in_urbs(struct snd_line6_pcm *line6pcm);
+1 −1
Original line number Diff line number Diff line
/*
 * Line6 Linux USB driver - 0.9.0
 * Line6 Linux USB driver - 0.9.1beta
 *
 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
 *
Loading