Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170059
b: refs/heads/master
c: e7373b7
h: refs/heads/master
i:
  170057: 05dac67
  170055: 5b3e05e
v: v3
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Nov 10, 2009
1 parent 50b3305 commit 25b28f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91d12c485b8949cce6c13ab641147c5bc86ce8b9
refs/heads/master: e7373b702f6eab35f315e016a4159860a7a4d686
3 changes: 3 additions & 0 deletions trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ struct snd_pcm_group { /* keep linked substreams */
int count;
};

struct pid;

struct snd_pcm_substream {
struct snd_pcm *pcm;
struct snd_pcm_str *pstr;
Expand Down Expand Up @@ -379,6 +381,7 @@ struct snd_pcm_substream {
atomic_t mmap_count;
unsigned int f_flags;
void (*pcm_release)(struct snd_pcm_substream *);
struct pid *pid;
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
struct snd_pcm_oss_substream oss;
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
return;
}
snd_iprintf(buffer, "state: %s\n", snd_pcm_state_name(status.state));
snd_iprintf(buffer, "owner_pid : %d\n", pid_vnr(substream->pid));
snd_iprintf(buffer, "trigger_time: %ld.%09ld\n",
status.trigger_tstamp.tv_sec, status.trigger_tstamp.tv_nsec);
snd_iprintf(buffer, "tstamp : %ld.%09ld\n",
Expand Down Expand Up @@ -900,6 +901,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
substream->private_data = pcm->private_data;
substream->ref_count = 1;
substream->f_flags = file->f_flags;
substream->pid = get_pid(task_pid(current));
pstr->substream_opened++;
*rsubstream = substream;
return 0;
Expand All @@ -921,6 +923,8 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
kfree(runtime->hw_constraints.rules);
kfree(runtime);
substream->runtime = NULL;
put_pid(substream->pid);
substream->pid = NULL;
substream->pstr->substream_opened--;
}

Expand Down

0 comments on commit 25b28f7

Please sign in to comment.