Commit 97f8d3b6 authored by Daniel Mack's avatar Daniel Mack Committed by Takashi Iwai

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: default avatarDaniel Mack <zonque@gmail.com>
Reported-by: default avatarFelix Homann <linuxaudio@showlabor.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4f7c39dc
...@@ -474,6 +474,11 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream, ...@@ -474,6 +474,11 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream,
mutex_unlock(&subs->stream->chip->shutdown_mutex); mutex_unlock(&subs->stream->chip->shutdown_mutex);
} }
if (ret == 0) {
subs->interface = fmt->iface;
subs->altset_idx = fmt->altset_idx;
}
return ret; return ret;
} }
...@@ -1123,13 +1128,16 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea ...@@ -1123,13 +1128,16 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
subs->data_endpoint->prepare_data_urb = prepare_playback_urb; subs->data_endpoint->prepare_data_urb = prepare_playback_urb;
subs->data_endpoint->retire_data_urb = retire_playback_urb; subs->data_endpoint->retire_data_urb = retire_playback_urb;
subs->running = 1;
return 0; return 0;
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
stop_endpoints(subs, 0, 0, 0); stop_endpoints(subs, 0, 0, 0);
subs->running = 0;
return 0; return 0;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH: case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
subs->data_endpoint->prepare_data_urb = NULL; subs->data_endpoint->prepare_data_urb = NULL;
subs->data_endpoint->retire_data_urb = NULL; subs->data_endpoint->retire_data_urb = NULL;
subs->running = 0;
return 0; return 0;
} }
...@@ -1148,15 +1156,19 @@ int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int c ...@@ -1148,15 +1156,19 @@ int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int c
return err; return err;
subs->data_endpoint->retire_data_urb = retire_capture_urb; subs->data_endpoint->retire_data_urb = retire_capture_urb;
subs->running = 1;
return 0; return 0;
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
stop_endpoints(subs, 0, 0, 0); stop_endpoints(subs, 0, 0, 0);
subs->running = 0;
return 0; return 0;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH: case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
subs->data_endpoint->retire_data_urb = NULL; subs->data_endpoint->retire_data_urb = NULL;
subs->running = 0;
return 0; return 0;
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
subs->data_endpoint->retire_data_urb = retire_capture_urb; subs->data_endpoint->retire_data_urb = retire_capture_urb;
subs->running = 1;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment