All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: snd-usb: remove refactorization left-overs
@ 2012-04-21 11:52 Daniel Mack
  2012-04-21 15:41 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mack @ 2012-04-21 11:52 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, clemens, Daniel Mack

Drop some struct members and definitions that became obsolete during
the refactorization of the driver.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/usb/card.h |   13 -------------
 sound/usb/proc.c |    6 +-----
 2 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/sound/usb/card.h b/sound/usb/card.h
index 77d2eec..0d37238 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -43,13 +43,6 @@ struct snd_urb_ctx {
 	struct list_head ready_list;
 };
 
-struct snd_urb_ops {
-	int (*prepare)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
-	int (*retire)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
-	int (*prepare_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
-	int (*retire_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
-};
-
 struct snd_usb_endpoint {
 	struct snd_usb_audio *chip;
 
@@ -125,11 +118,6 @@ struct snd_usb_substream {
 	unsigned long active_mask;	/* bitmask of active urbs */
 	unsigned long unlink_mask;	/* bitmask of unlinked urbs */
 
-	unsigned int nurbs;			/* # urbs */
-	struct snd_urb_ctx dataurb[MAX_URBS];	/* data urb table */
-	struct snd_urb_ctx syncurb[SYNC_URBS];	/* sync urb table */
-	char *syncbuf;				/* sync buffer for all sync URBs */
-	dma_addr_t sync_dma;			/* DMA address of syncbuf */
 	/* data and sync endpoints for this stream */
 	struct snd_usb_endpoint *data_endpoint;
 	struct snd_usb_endpoint *sync_endpoint;
@@ -141,7 +129,6 @@ struct snd_usb_substream {
 	struct snd_pcm_hw_constraint_list rate_list;	/* limited rates */
 	spinlock_t lock;
 
-	struct snd_urb_ops ops;		/* callbacks (must be filled at init) */
 	int last_frame_number;          /* stored frame number */
 	int last_delay;                 /* stored delay */
 };
diff --git a/sound/usb/proc.c b/sound/usb/proc.c
index 06e23d8..ebc1a5b 100644
--- a/sound/usb/proc.c
+++ b/sound/usb/proc.c
@@ -25,6 +25,7 @@
 #include "usbaudio.h"
 #include "helper.h"
 #include "card.h"
+#include "endpoint.h"
 #include "proc.h"
 
 /* convert our full speed USB rate into sampling rate in Hz */
@@ -137,14 +138,9 @@ static void proc_dump_ep_status(struct snd_usb_substream *subs,
 static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
 {
 	if (subs->running) {
-		unsigned int i;
 		snd_iprintf(buffer, "  Status: Running\n");
 		snd_iprintf(buffer, "    Interface = %d\n", subs->interface);
 		snd_iprintf(buffer, "    Altset = %d\n", subs->altset_idx);
-		snd_iprintf(buffer, "    URBs = %d [ ", subs->nurbs);
-		for (i = 0; i < subs->nurbs; i++)
-			snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
-		snd_iprintf(buffer, "]\n");
 		proc_dump_ep_status(subs, subs->data_endpoint, buffer);
 		proc_dump_ep_status(subs, subs->sync_endpoint, buffer);
 	} else {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: snd-usb: remove refactorization left-overs
  2012-04-21 11:52 [PATCH] ALSA: snd-usb: remove refactorization left-overs Daniel Mack
@ 2012-04-21 15:41 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2012-04-21 15:41 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, clemens

At Sat, 21 Apr 2012 13:52:12 +0200,
Daniel Mack wrote:
> 
> Drop some struct members and definitions that became obsolete during
> the refactorization of the driver.
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>

Thanks, applied now.
(BTW, topic/usb-endpoint was merged into topic/misc branch.)


Takashi

> ---
>  sound/usb/card.h |   13 -------------
>  sound/usb/proc.c |    6 +-----
>  2 files changed, 1 insertions(+), 18 deletions(-)
> 
> diff --git a/sound/usb/card.h b/sound/usb/card.h
> index 77d2eec..0d37238 100644
> --- a/sound/usb/card.h
> +++ b/sound/usb/card.h
> @@ -43,13 +43,6 @@ struct snd_urb_ctx {
>  	struct list_head ready_list;
>  };
>  
> -struct snd_urb_ops {
> -	int (*prepare)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
> -	int (*retire)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
> -	int (*prepare_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
> -	int (*retire_sync)(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime, struct urb *u);
> -};
> -
>  struct snd_usb_endpoint {
>  	struct snd_usb_audio *chip;
>  
> @@ -125,11 +118,6 @@ struct snd_usb_substream {
>  	unsigned long active_mask;	/* bitmask of active urbs */
>  	unsigned long unlink_mask;	/* bitmask of unlinked urbs */
>  
> -	unsigned int nurbs;			/* # urbs */
> -	struct snd_urb_ctx dataurb[MAX_URBS];	/* data urb table */
> -	struct snd_urb_ctx syncurb[SYNC_URBS];	/* sync urb table */
> -	char *syncbuf;				/* sync buffer for all sync URBs */
> -	dma_addr_t sync_dma;			/* DMA address of syncbuf */
>  	/* data and sync endpoints for this stream */
>  	struct snd_usb_endpoint *data_endpoint;
>  	struct snd_usb_endpoint *sync_endpoint;
> @@ -141,7 +129,6 @@ struct snd_usb_substream {
>  	struct snd_pcm_hw_constraint_list rate_list;	/* limited rates */
>  	spinlock_t lock;
>  
> -	struct snd_urb_ops ops;		/* callbacks (must be filled at init) */
>  	int last_frame_number;          /* stored frame number */
>  	int last_delay;                 /* stored delay */
>  };
> diff --git a/sound/usb/proc.c b/sound/usb/proc.c
> index 06e23d8..ebc1a5b 100644
> --- a/sound/usb/proc.c
> +++ b/sound/usb/proc.c
> @@ -25,6 +25,7 @@
>  #include "usbaudio.h"
>  #include "helper.h"
>  #include "card.h"
> +#include "endpoint.h"
>  #include "proc.h"
>  
>  /* convert our full speed USB rate into sampling rate in Hz */
> @@ -137,14 +138,9 @@ static void proc_dump_ep_status(struct snd_usb_substream *subs,
>  static void proc_dump_substream_status(struct snd_usb_substream *subs, struct snd_info_buffer *buffer)
>  {
>  	if (subs->running) {
> -		unsigned int i;
>  		snd_iprintf(buffer, "  Status: Running\n");
>  		snd_iprintf(buffer, "    Interface = %d\n", subs->interface);
>  		snd_iprintf(buffer, "    Altset = %d\n", subs->altset_idx);
> -		snd_iprintf(buffer, "    URBs = %d [ ", subs->nurbs);
> -		for (i = 0; i < subs->nurbs; i++)
> -			snd_iprintf(buffer, "%d ", subs->dataurb[i].packets);
> -		snd_iprintf(buffer, "]\n");
>  		proc_dump_ep_status(subs, subs->data_endpoint, buffer);
>  		proc_dump_ep_status(subs, subs->sync_endpoint, buffer);
>  	} else {
> -- 
> 1.7.5.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-21 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 11:52 [PATCH] ALSA: snd-usb: remove refactorization left-overs Daniel Mack
2012-04-21 15:41 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.