diff options
-rw-r--r-- | sound/usb/usbaudio.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 19bdcc74c96c..478e504f7028 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -1511,21 +1511,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) | |||
1511 | return 0; | 1511 | return 0; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | static struct snd_pcm_hardware snd_usb_playback = | 1514 | static struct snd_pcm_hardware snd_usb_hardware = |
1515 | { | ||
1516 | .info = SNDRV_PCM_INFO_MMAP | | ||
1517 | SNDRV_PCM_INFO_MMAP_VALID | | ||
1518 | SNDRV_PCM_INFO_BATCH | | ||
1519 | SNDRV_PCM_INFO_INTERLEAVED | | ||
1520 | SNDRV_PCM_INFO_BLOCK_TRANSFER, | ||
1521 | .buffer_bytes_max = 1024 * 1024, | ||
1522 | .period_bytes_min = 64, | ||
1523 | .period_bytes_max = 512 * 1024, | ||
1524 | .periods_min = 2, | ||
1525 | .periods_max = 1024, | ||
1526 | }; | ||
1527 | |||
1528 | static struct snd_pcm_hardware snd_usb_capture = | ||
1529 | { | 1515 | { |
1530 | .info = SNDRV_PCM_INFO_MMAP | | 1516 | .info = SNDRV_PCM_INFO_MMAP | |
1531 | SNDRV_PCM_INFO_MMAP_VALID | | 1517 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -1904,8 +1890,7 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre | |||
1904 | return 0; | 1890 | return 0; |
1905 | } | 1891 | } |
1906 | 1892 | ||
1907 | static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction, | 1893 | static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction) |
1908 | struct snd_pcm_hardware *hw) | ||
1909 | { | 1894 | { |
1910 | struct snd_usb_stream *as = snd_pcm_substream_chip(substream); | 1895 | struct snd_usb_stream *as = snd_pcm_substream_chip(substream); |
1911 | struct snd_pcm_runtime *runtime = substream->runtime; | 1896 | struct snd_pcm_runtime *runtime = substream->runtime; |
@@ -1913,7 +1898,7 @@ static int snd_usb_pcm_open(struct snd_pcm_substream *substream, int direction, | |||
1913 | 1898 | ||
1914 | subs->interface = -1; | 1899 | subs->interface = -1; |
1915 | subs->format = 0; | 1900 | subs->format = 0; |
1916 | runtime->hw = *hw; | 1901 | runtime->hw = snd_usb_hardware; |
1917 | runtime->private_data = subs; | 1902 | runtime->private_data = subs; |
1918 | subs->pcm_substream = substream; | 1903 | subs->pcm_substream = substream; |
1919 | return setup_hw_info(runtime, subs); | 1904 | return setup_hw_info(runtime, subs); |
@@ -1934,7 +1919,7 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream, int direction) | |||
1934 | 1919 | ||
1935 | static int snd_usb_playback_open(struct snd_pcm_substream *substream) | 1920 | static int snd_usb_playback_open(struct snd_pcm_substream *substream) |
1936 | { | 1921 | { |
1937 | return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_PLAYBACK, &snd_usb_playback); | 1922 | return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_PLAYBACK); |
1938 | } | 1923 | } |
1939 | 1924 | ||
1940 | static int snd_usb_playback_close(struct snd_pcm_substream *substream) | 1925 | static int snd_usb_playback_close(struct snd_pcm_substream *substream) |
@@ -1944,7 +1929,7 @@ static int snd_usb_playback_close(struct snd_pcm_substream *substream) | |||
1944 | 1929 | ||
1945 | static int snd_usb_capture_open(struct snd_pcm_substream *substream) | 1930 | static int snd_usb_capture_open(struct snd_pcm_substream *substream) |
1946 | { | 1931 | { |
1947 | return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_CAPTURE, &snd_usb_capture); | 1932 | return snd_usb_pcm_open(substream, SNDRV_PCM_STREAM_CAPTURE); |
1948 | } | 1933 | } |
1949 | 1934 | ||
1950 | static int snd_usb_capture_close(struct snd_pcm_substream *substream) | 1935 | static int snd_usb_capture_close(struct snd_pcm_substream *substream) |