~ubuntu-branches/ubuntu/precise/alsa-driver/precise

« back to all changes in this revision

Viewing changes to alsa-kernel/pci/ctxfi/ctpcm.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2011-02-21 18:06:40 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20110221180640-a8p2yxtvgf7xbxub
Tags: 1.0.24+dfsg-0ubuntu1
* New upstream release
* Refreshed patches:
  - distinguish_kernel_makefile_and_source_dirs.patch
  - debian_dfsg_configure.patch
* debian/control: Update Vcs-bzr field to point to new branch location

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
 
130
130
        apcm->substream = substream;
131
131
        apcm->interrupt = ct_atc_pcm_interrupt;
132
 
        runtime->private_data = apcm;
133
 
        runtime->private_free = ct_atc_pcm_free_substream;
134
132
        if (IEC958 == substream->pcm->device) {
135
133
                runtime->hw = ct_spdif_passthru_playback_hw;
136
134
                atc->spdif_out_passthru(atc, 1);
155
153
        }
156
154
 
157
155
        apcm->timer = ct_timer_instance_new(atc->timer, apcm);
158
 
        if (!apcm->timer)
 
156
        if (!apcm->timer) {
 
157
                kfree(apcm);
159
158
                return -ENOMEM;
 
159
        }
 
160
        runtime->private_data = apcm;
 
161
        runtime->private_free = ct_atc_pcm_free_substream;
160
162
 
161
163
        return 0;
162
164
}
278
280
        apcm->started = 0;
279
281
        apcm->substream = substream;
280
282
        apcm->interrupt = ct_atc_pcm_interrupt;
281
 
        runtime->private_data = apcm;
282
 
        runtime->private_free = ct_atc_pcm_free_substream;
283
283
        runtime->hw = ct_pcm_capture_hw;
284
284
        runtime->hw.rate_max = atc->rsr * atc->msr;
285
285
 
298
298
        }
299
299
 
300
300
        apcm->timer = ct_timer_instance_new(atc->timer, apcm);
301
 
        if (!apcm->timer)
 
301
        if (!apcm->timer) {
 
302
                kfree(apcm);
302
303
                return -ENOMEM;
 
304
        }
 
305
        runtime->private_data = apcm;
 
306
        runtime->private_free = ct_atc_pcm_free_substream;
303
307
 
304
308
        return 0;
305
309
}