Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284106
b: refs/heads/master
c: c382a5d
h: refs/heads/master
v: v3
  • Loading branch information
Eliot Blennerhassett authored and Takashi Iwai committed Dec 22, 2011
1 parent 7500905 commit 146f80b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40818b6242513676c8adf30811fb7877b02005fb
refs/heads/master: c382a5da5cda3e0d8a8f2e8809460285d0a7c1cb
17 changes: 13 additions & 4 deletions trunk/sound/pci/asihpi/asihpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ struct snd_card_asihpi {
u16 update_interval_frames;
u16 in_max_chans;
u16 out_max_chans;
u16 in_min_chans;
u16 out_min_chans;
};

/* Per stream data */
Expand Down Expand Up @@ -968,8 +970,6 @@ static void snd_card_asihpi_playback_format(struct snd_card_asihpi *asihpi,
}

static struct snd_pcm_hardware snd_card_asihpi_playback = {
.channels_min = 1,
.channels_max = 2,
.buffer_bytes_max = BUFFER_BYTES_MAX,
.period_bytes_min = PERIOD_BYTES_MIN,
.period_bytes_max = BUFFER_BYTES_MAX / PERIODS_MIN,
Expand Down Expand Up @@ -1013,6 +1013,7 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream)
runtime->private_free = snd_card_asihpi_runtime_free;

snd_card_asihpi_playback.channels_max = card->out_max_chans;
snd_card_asihpi_playback.channels_min = card->out_min_chans;
/*?snd_card_asihpi_playback.period_bytes_min =
card->out_max_chans * 4096; */

Expand Down Expand Up @@ -1150,8 +1151,6 @@ static void snd_card_asihpi_capture_format(struct snd_card_asihpi *asihpi,


static struct snd_pcm_hardware snd_card_asihpi_capture = {
.channels_min = 1,
.channels_max = 2,
.buffer_bytes_max = BUFFER_BYTES_MAX,
.period_bytes_min = PERIOD_BYTES_MIN,
.period_bytes_max = BUFFER_BYTES_MAX / PERIODS_MIN,
Expand Down Expand Up @@ -1193,6 +1192,7 @@ static int snd_card_asihpi_capture_open(struct snd_pcm_substream *substream)
runtime->private_free = snd_card_asihpi_runtime_free;

snd_card_asihpi_capture.channels_max = card->in_max_chans;
snd_card_asihpi_capture.channels_min = card->in_min_chans;
snd_card_asihpi_capture_format(card, dpcm->h_stream,
&snd_card_asihpi_capture);
snd_card_asihpi_pcm_samplerates(card, &snd_card_asihpi_capture);
Expand Down Expand Up @@ -2883,6 +2883,15 @@ static int __devinit snd_asihpi_probe(struct pci_dev *pci_dev,
asihpi->out_max_chans = 2;
}

if (asihpi->out_max_chans > 2) { /* assume LL mode */
asihpi->out_min_chans = asihpi->out_max_chans;
asihpi->in_min_chans = asihpi->in_max_chans;
asihpi->support_grouping = 0;
} else {
asihpi->out_min_chans = 1;
asihpi->in_min_chans = 1;
}

snd_printk(KERN_INFO "has dma:%d, grouping:%d, mrx:%d\n",
asihpi->can_dma,
asihpi->support_grouping,
Expand Down

0 comments on commit 146f80b

Please sign in to comment.