~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to sound/pci/au88x0/au88x0_pcm.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        .channels_min = 1,
45
45
        .channels_max = 2,
46
46
        .buffer_bytes_max = 0x10000,
47
 
        .period_bytes_min = 0x1,
 
47
        .period_bytes_min = 0x20,
48
48
        .period_bytes_max = 0x1000,
49
49
        .periods_min = 2,
50
 
        .periods_max = 32,
 
50
        .periods_max = 1024,
51
51
};
52
52
 
53
53
#ifndef CHIP_AU8820
140
140
                                        SNDRV_PCM_HW_PARAM_PERIOD_BYTES)) < 0)
141
141
                return err;
142
142
 
 
143
        snd_pcm_hw_constraint_step(runtime, 0,
 
144
                                        SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 64);
 
145
 
143
146
        if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
144
147
#ifndef CHIP_AU8820
145
148
                if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_A3D) {
423
426
*/
424
427
 
425
428
static char *vortex_pcm_prettyname[VORTEX_PCM_LAST] = {
426
 
        "AU88x0 ADB",
427
 
        "AU88x0 SPDIF",
428
 
        "AU88x0 A3D",
429
 
        "AU88x0 WT",
430
 
        "AU88x0 I2S",
 
429
        CARD_NAME " ADB",
 
430
        CARD_NAME " SPDIF",
 
431
        CARD_NAME " A3D",
 
432
        CARD_NAME " WT",
 
433
        CARD_NAME " I2S",
431
434
};
432
435
static char *vortex_pcm_name[VORTEX_PCM_LAST] = {
433
436
        "adb",
515
518
                return -ENODEV;
516
519
 
517
520
        /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the 
518
 
         * same dma engine. WT uses it own separate dma engine whcih cant capture. */
 
521
         * same dma engine. WT uses it own separate dma engine which can't capture. */
519
522
        if (idx == VORTEX_PCM_ADB)
520
523
                nr_capt = nr;
521
524
        else
524
527
                          nr_capt, &pcm);
525
528
        if (err < 0)
526
529
                return err;
527
 
        strcpy(pcm->name, vortex_pcm_name[idx]);
 
530
        snprintf(pcm->name, sizeof(pcm->name),
 
531
                "%s %s", CARD_NAME_SHORT, vortex_pcm_name[idx]);
528
532
        chip->pcm[idx] = pcm;
529
533
        // This is an evil hack, but it saves a lot of duplicated code.
530
534
        VORTEX_PCM_TYPE(pcm) = idx;