ak4117.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) | ak4117.c (5e246b850df563224be26f1d409cf66fd6c968df) |
---|---|
1/* 2 * Routines for control of the AK4117 via 4-wire serial interface 3 * IEC958 (S/PDIF) receiver by Asahi Kasei 4 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 5 * 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 417 unchanged lines hidden (view full) --- 426}; 427 428int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream) 429{ 430 struct snd_kcontrol *kctl; 431 unsigned int idx; 432 int err; 433 | 1/* 2 * Routines for control of the AK4117 via 4-wire serial interface 3 * IEC958 (S/PDIF) receiver by Asahi Kasei 4 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 5 * 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 417 unchanged lines hidden (view full) --- 426}; 427 428int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream) 429{ 430 struct snd_kcontrol *kctl; 431 unsigned int idx; 432 int err; 433 |
434 snd_assert(cap_substream, return -EINVAL); | 434 if (snd_BUG_ON(!cap_substream)) 435 return -EINVAL; |
435 ak4117->substream = cap_substream; 436 for (idx = 0; idx < AK4117_CONTROLS; idx++) { 437 kctl = snd_ctl_new1(&snd_ak4117_iec958_controls[idx], ak4117); 438 if (kctl == NULL) 439 return -ENOMEM; 440 kctl->id.device = cap_substream->pcm->device; 441 kctl->id.subdevice = cap_substream->number; 442 err = snd_ctl_add(ak4117->card, kctl); --- 108 unchanged lines hidden --- | 436 ak4117->substream = cap_substream; 437 for (idx = 0; idx < AK4117_CONTROLS; idx++) { 438 kctl = snd_ctl_new1(&snd_ak4117_iec958_controls[idx], ak4117); 439 if (kctl == NULL) 440 return -ENOMEM; 441 kctl->id.device = cap_substream->pcm->device; 442 kctl->id.subdevice = cap_substream->number; 443 err = snd_ctl_add(ak4117->card, kctl); --- 108 unchanged lines hidden --- |