diff options
author | Daniel Mack <zonque@gmail.com> | 2012-05-21 06:47:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-21 06:51:08 -0400 |
commit | 97f8d3b6503082416898f893a442a78f8819c42a (patch) | |
tree | 4f52f9c4146aeae2a54309e69a1ea94aa5a000e5 /sound | |
parent | 4f7c39dc557cabdbc932ae83432cc225c480133c (diff) |
ALSA: snd-usb: fix stream info output in /proc
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | 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 2d3a04d829b7..24839d932648 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -474,6 +474,11 @@ unlock: | |||
474 | mutex_unlock(&subs->stream->chip->shutdown_mutex); | 474 | mutex_unlock(&subs->stream->chip->shutdown_mutex); |
475 | } | 475 | } |
476 | 476 | ||
477 | if (ret == 0) { | ||
478 | subs->interface = fmt->iface; | ||
479 | subs->altset_idx = fmt->altset_idx; | ||
480 | } | ||
481 | |||
477 | return ret; | 482 | return ret; |
478 | } | 483 | } |
479 | 484 | ||
@@ -1123,13 +1128,16 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea | |||
1123 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 1128 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
1124 | subs->data_endpoint->prepare_data_urb = prepare_playback_urb; | 1129 | subs->data_endpoint->prepare_data_urb = prepare_playback_urb; |
1125 | subs->data_endpoint->retire_data_urb = retire_playback_urb; | 1130 | subs->data_endpoint->retire_data_urb = retire_playback_urb; |
1131 | subs->running = 1; | ||
1126 | return 0; | 1132 | return 0; |
1127 | case SNDRV_PCM_TRIGGER_STOP: | 1133 | case SNDRV_PCM_TRIGGER_STOP: |
1128 | stop_endpoints(subs, 0, 0, 0); | 1134 | stop_endpoints(subs, 0, 0, 0); |
1135 | subs->running = 0; | ||
1129 | return 0; | 1136 | return 0; |
1130 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 1137 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
1131 | subs->data_endpoint->prepare_data_urb = NULL; | 1138 | subs->data_endpoint->prepare_data_urb = NULL; |
1132 | subs->data_endpoint->retire_data_urb = NULL; | 1139 | subs->data_endpoint->retire_data_urb = NULL; |
1140 | subs->running = 0; | ||
1133 | return 0; | 1141 | return 0; |
1134 | } | 1142 | } |
1135 | 1143 | ||
@@ -1148,15 +1156,19 @@ int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int c | |||
1148 | return err; | 1156 | return err; |
1149 | 1157 | ||
1150 | subs->data_endpoint->retire_data_urb = retire_capture_urb; | 1158 | subs->data_endpoint->retire_data_urb = retire_capture_urb; |
1159 | subs->running = 1; | ||
1151 | return 0; | 1160 | return 0; |
1152 | case SNDRV_PCM_TRIGGER_STOP: | 1161 | case SNDRV_PCM_TRIGGER_STOP: |
1153 | stop_endpoints(subs, 0, 0, 0); | 1162 | stop_endpoints(subs, 0, 0, 0); |
1163 | subs->running = 0; | ||
1154 | return 0; | 1164 | return 0; |
1155 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 1165 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
1156 | subs->data_endpoint->retire_data_urb = NULL; | 1166 | subs->data_endpoint->retire_data_urb = NULL; |
1167 | subs->running = 0; | ||
1157 | return 0; | 1168 | return 0; |
1158 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 1169 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
1159 | subs->data_endpoint->retire_data_urb = retire_capture_urb; | 1170 | subs->data_endpoint->retire_data_urb = retire_capture_urb; |
1171 | subs->running = 1; | ||
1160 | return 0; | 1172 | return 0; |
1161 | } | 1173 | } |
1162 | 1174 | ||