diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2005-08-10 05:18:19 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-08-30 02:44:48 -0400 |
commit | 443feb882679e21ba5d1e0ff9eff067ac26d9461 (patch) | |
tree | df831615407843f4c33a16adc9efe841ec70aa46 /sound/core/oss | |
parent | 9bcf655109ae06a8e652671a0de6fe2da5c213c2 (diff) |
[ALSA] ALSA's struct _snd_pcm_substream: Obsolete open_flag
PCM Midlevel,ALSA<-OSS emulation,USB USX2Y
This patch removes open_flag from struct _snd_pcm_substream.
All of its uses are substituted by querying struct _snd_pcm_substream's
member ffile instead.
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index de7444c586f9..a13bd7bb4c9f 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -1705,13 +1705,12 @@ static int snd_pcm_oss_release_file(snd_pcm_oss_file_t *pcm_oss_file) | |||
1705 | if (snd_pcm_running(substream)) | 1705 | if (snd_pcm_running(substream)) |
1706 | snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP); | 1706 | snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP); |
1707 | snd_pcm_stream_unlock_irq(substream); | 1707 | snd_pcm_stream_unlock_irq(substream); |
1708 | if (substream->open_flag) { | 1708 | if (substream->ffile != NULL) { |
1709 | if (substream->ops->hw_free != NULL) | 1709 | if (substream->ops->hw_free != NULL) |
1710 | substream->ops->hw_free(substream); | 1710 | substream->ops->hw_free(substream); |
1711 | substream->ops->close(substream); | 1711 | substream->ops->close(substream); |
1712 | substream->open_flag = 0; | 1712 | substream->ffile = NULL; |
1713 | } | 1713 | } |
1714 | substream->ffile = NULL; | ||
1715 | snd_pcm_oss_release_substream(substream); | 1714 | snd_pcm_oss_release_substream(substream); |
1716 | snd_pcm_release_substream(substream); | 1715 | snd_pcm_release_substream(substream); |
1717 | } | 1716 | } |
@@ -1778,14 +1777,13 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
1778 | snd_pcm_oss_release_file(pcm_oss_file); | 1777 | snd_pcm_oss_release_file(pcm_oss_file); |
1779 | return err; | 1778 | return err; |
1780 | } | 1779 | } |
1781 | psubstream->open_flag = 1; | 1780 | psubstream->ffile = file; |
1782 | err = snd_pcm_hw_constraints_complete(psubstream); | 1781 | err = snd_pcm_hw_constraints_complete(psubstream); |
1783 | if (err < 0) { | 1782 | if (err < 0) { |
1784 | snd_printd("snd_pcm_hw_constraint_complete failed\n"); | 1783 | snd_printd("snd_pcm_hw_constraint_complete failed\n"); |
1785 | snd_pcm_oss_release_file(pcm_oss_file); | 1784 | snd_pcm_oss_release_file(pcm_oss_file); |
1786 | return err; | 1785 | return err; |
1787 | } | 1786 | } |
1788 | psubstream->ffile = file; | ||
1789 | snd_pcm_oss_init_substream(psubstream, psetup, minor); | 1787 | snd_pcm_oss_init_substream(psubstream, psetup, minor); |
1790 | } | 1788 | } |
1791 | if (csubstream != NULL) { | 1789 | if (csubstream != NULL) { |
@@ -1800,14 +1798,13 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
1800 | snd_pcm_oss_release_file(pcm_oss_file); | 1798 | snd_pcm_oss_release_file(pcm_oss_file); |
1801 | return err; | 1799 | return err; |
1802 | } | 1800 | } |
1803 | csubstream->open_flag = 1; | 1801 | csubstream->ffile = file; |
1804 | err = snd_pcm_hw_constraints_complete(csubstream); | 1802 | err = snd_pcm_hw_constraints_complete(csubstream); |
1805 | if (err < 0) { | 1803 | if (err < 0) { |
1806 | snd_printd("snd_pcm_hw_constraint_complete failed\n"); | 1804 | snd_printd("snd_pcm_hw_constraint_complete failed\n"); |
1807 | snd_pcm_oss_release_file(pcm_oss_file); | 1805 | snd_pcm_oss_release_file(pcm_oss_file); |
1808 | return err; | 1806 | return err; |
1809 | } | 1807 | } |
1810 | csubstream->ffile = file; | ||
1811 | snd_pcm_oss_init_substream(csubstream, csetup, minor); | 1808 | snd_pcm_oss_init_substream(csubstream, csetup, minor); |
1812 | } | 1809 | } |
1813 | 1810 | ||