ak4114.c (7022b15e2a9f878fd5184586064c63352c3dd225) | ak4114.c (5e246b850df563224be26f1d409cf66fd6c968df) |
---|---|
1/* 2 * Routines for control of the AK4114 via I2C and 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 --- 461 unchanged lines hidden (view full) --- 470int snd_ak4114_build(struct ak4114 *ak4114, 471 struct snd_pcm_substream *ply_substream, 472 struct snd_pcm_substream *cap_substream) 473{ 474 struct snd_kcontrol *kctl; 475 unsigned int idx; 476 int err; 477 | 1/* 2 * Routines for control of the AK4114 via I2C and 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 --- 461 unchanged lines hidden (view full) --- 470int snd_ak4114_build(struct ak4114 *ak4114, 471 struct snd_pcm_substream *ply_substream, 472 struct snd_pcm_substream *cap_substream) 473{ 474 struct snd_kcontrol *kctl; 475 unsigned int idx; 476 int err; 477 |
478 snd_assert(cap_substream, return -EINVAL); | 478 if (snd_BUG_ON(!cap_substream)) 479 return -EINVAL; |
479 ak4114->playback_substream = ply_substream; 480 ak4114->capture_substream = cap_substream; 481 for (idx = 0; idx < AK4114_CONTROLS; idx++) { 482 kctl = snd_ctl_new1(&snd_ak4114_iec958_controls[idx], ak4114); 483 if (kctl == NULL) 484 return -ENOMEM; 485 if (strstr(kctl->id.name, "Playback")) { 486 if (ply_substream == NULL) { --- 139 unchanged lines hidden --- | 480 ak4114->playback_substream = ply_substream; 481 ak4114->capture_substream = cap_substream; 482 for (idx = 0; idx < AK4114_CONTROLS; idx++) { 483 kctl = snd_ctl_new1(&snd_ak4114_iec958_controls[idx], ak4114); 484 if (kctl == NULL) 485 return -ENOMEM; 486 if (strstr(kctl->id.name, "Playback")) { 487 if (ply_substream == NULL) { --- 139 unchanged lines hidden --- |