Loading sound/usb/endpoint.c +27 −19 Original line number Diff line number Diff line Loading @@ -183,25 +183,13 @@ static void retire_inbound_urb(struct snd_usb_endpoint *ep, ep->retire_data_urb(ep->data_subs, urb); } /* * Prepare a PLAYBACK urb for submission to the bus. */ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, static void prepare_silent_urb(struct snd_usb_endpoint *ep, struct snd_urb_ctx *ctx) { int i; struct urb *urb = ctx->urb; unsigned char *cp = urb->transfer_buffer; urb->dev = ep->chip->dev; /* we need to set this at each time */ switch (ep->type) { case SND_USB_ENDPOINT_TYPE_DATA: if (ep->prepare_data_urb) { ep->prepare_data_urb(ep->data_subs, urb); } else { /* no data provider, so send silence */ unsigned int offs = 0; int i; for (i = 0; i < ctx->packets; ++i) { int counts; Loading @@ -220,6 +208,26 @@ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, memset(urb->transfer_buffer, ep->silence_value, offs * ep->stride); } /* * Prepare a PLAYBACK urb for submission to the bus. */ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, struct snd_urb_ctx *ctx) { struct urb *urb = ctx->urb; unsigned char *cp = urb->transfer_buffer; urb->dev = ep->chip->dev; /* we need to set this at each time */ switch (ep->type) { case SND_USB_ENDPOINT_TYPE_DATA: if (ep->prepare_data_urb) { ep->prepare_data_urb(ep->data_subs, urb); } else { /* no data provider, so send silence */ prepare_silent_urb(ep, ctx); } break; case SND_USB_ENDPOINT_TYPE_SYNC: Loading Loading
sound/usb/endpoint.c +27 −19 Original line number Diff line number Diff line Loading @@ -183,25 +183,13 @@ static void retire_inbound_urb(struct snd_usb_endpoint *ep, ep->retire_data_urb(ep->data_subs, urb); } /* * Prepare a PLAYBACK urb for submission to the bus. */ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, static void prepare_silent_urb(struct snd_usb_endpoint *ep, struct snd_urb_ctx *ctx) { int i; struct urb *urb = ctx->urb; unsigned char *cp = urb->transfer_buffer; urb->dev = ep->chip->dev; /* we need to set this at each time */ switch (ep->type) { case SND_USB_ENDPOINT_TYPE_DATA: if (ep->prepare_data_urb) { ep->prepare_data_urb(ep->data_subs, urb); } else { /* no data provider, so send silence */ unsigned int offs = 0; int i; for (i = 0; i < ctx->packets; ++i) { int counts; Loading @@ -220,6 +208,26 @@ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, memset(urb->transfer_buffer, ep->silence_value, offs * ep->stride); } /* * Prepare a PLAYBACK urb for submission to the bus. */ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, struct snd_urb_ctx *ctx) { struct urb *urb = ctx->urb; unsigned char *cp = urb->transfer_buffer; urb->dev = ep->chip->dev; /* we need to set this at each time */ switch (ep->type) { case SND_USB_ENDPOINT_TYPE_DATA: if (ep->prepare_data_urb) { ep->prepare_data_urb(ep->data_subs, urb); } else { /* no data provider, so send silence */ prepare_silent_urb(ep, ctx); } break; case SND_USB_ENDPOINT_TYPE_SYNC: Loading