All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de, linuxaudio@showlabor.de
Subject: Re: [PATCH] ALSA: snd-usb: fix stream info output in /proc
Date: Mon, 21 May 2012 12:55:09 +0200	[thread overview]
Message-ID: <s5hy5ol952q.wl%tiwai@suse.de> (raw)
In-Reply-To: <1337597256-23860-1-git-send-email-zonque@gmail.com>

At Mon, 21 May 2012 12:47:36 +0200,
Daniel Mack wrote:
> 
> Set some substream struct members to make the proc interface code work
> again.
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Reported-by: Felix Homann <linuxaudio@showlabor.de>

Applied now.
Thanks.


Takashi

> ---
>  sound/usb/pcm.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
> index 2d3a04d..24839d9 100644
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -474,6 +474,11 @@ unlock:
>  		mutex_unlock(&subs->stream->chip->shutdown_mutex);
>  	}
>  
> +	if (ret == 0) {
> +		subs->interface = fmt->iface;
> +		subs->altset_idx = fmt->altset_idx;
> +	}
> +
>  	return ret;
>  }
>  
> @@ -1123,13 +1128,16 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
>  	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
>  		subs->data_endpoint->prepare_data_urb = prepare_playback_urb;
>  		subs->data_endpoint->retire_data_urb = retire_playback_urb;
> +		subs->running = 1;
>  		return 0;
>  	case SNDRV_PCM_TRIGGER_STOP:
>  		stop_endpoints(subs, 0, 0, 0);
> +		subs->running = 0;
>  		return 0;
>  	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
>  		subs->data_endpoint->prepare_data_urb = NULL;
>  		subs->data_endpoint->retire_data_urb = NULL;
> +		subs->running = 0;
>  		return 0;
>  	}
>  
> @@ -1148,15 +1156,19 @@ int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int c
>  			return err;
>  
>  		subs->data_endpoint->retire_data_urb = retire_capture_urb;
> +		subs->running = 1;
>  		return 0;
>  	case SNDRV_PCM_TRIGGER_STOP:
>  		stop_endpoints(subs, 0, 0, 0);
> +		subs->running = 0;
>  		return 0;
>  	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
>  		subs->data_endpoint->retire_data_urb = NULL;
> +		subs->running = 0;
>  		return 0;
>  	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
>  		subs->data_endpoint->retire_data_urb = retire_capture_urb;
> +		subs->running = 1;
>  		return 0;
>  	}
>  
> -- 
> 1.7.5.4
> 

      reply	other threads:[~2012-05-21 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 10:47 [PATCH] ALSA: snd-usb: fix stream info output in /proc Daniel Mack
2012-05-21 10:55 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hy5ol952q.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linuxaudio@showlabor.de \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.