diff options
Diffstat (limited to 'sound/i2c')
-rw-r--r-- | sound/i2c/other/ak4114.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 8f7c42c036eb..1efb973137a6 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
@@ -435,7 +435,7 @@ static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = { | |||
435 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 435 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
436 | .info = snd_ak4114_in_bit_info, | 436 | .info = snd_ak4114_in_bit_info, |
437 | .get = snd_ak4114_in_bit_get, | 437 | .get = snd_ak4114_in_bit_get, |
438 | .private_value = (6<<8) | AK4114_REG_RCS1, | 438 | .private_value = (6<<8) | AK4114_REG_RCS0, |
439 | }, | 439 | }, |
440 | { | 440 | { |
441 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 441 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
@@ -443,7 +443,15 @@ static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = { | |||
443 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 443 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
444 | .info = snd_ak4114_in_bit_info, | 444 | .info = snd_ak4114_in_bit_info, |
445 | .get = snd_ak4114_in_bit_get, | 445 | .get = snd_ak4114_in_bit_get, |
446 | .private_value = (3<<8) | AK4114_REG_RCS1, | 446 | .private_value = (3<<8) | AK4114_REG_RCS0, |
447 | }, | ||
448 | { | ||
449 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | ||
450 | .name = "IEC958 PPL Lock Status", | ||
451 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | ||
452 | .info = snd_ak4114_in_bit_info, | ||
453 | .get = snd_ak4114_in_bit_get, | ||
454 | .private_value = (1<<31) | (4<<8) | AK4114_REG_RCS0, | ||
447 | } | 455 | } |
448 | }; | 456 | }; |
449 | 457 | ||
@@ -462,7 +470,7 @@ int snd_ak4114_build(struct ak4114 *ak4114, | |||
462 | kctl = snd_ctl_new1(&snd_ak4114_iec958_controls[idx], ak4114); | 470 | kctl = snd_ctl_new1(&snd_ak4114_iec958_controls[idx], ak4114); |
463 | if (kctl == NULL) | 471 | if (kctl == NULL) |
464 | return -ENOMEM; | 472 | return -ENOMEM; |
465 | if (!strstr(kctl->id.name, "Playback")) { | 473 | if (strstr(kctl->id.name, "Playback")) { |
466 | if (ply_substream == NULL) { | 474 | if (ply_substream == NULL) { |
467 | snd_ctl_free_one(kctl); | 475 | snd_ctl_free_one(kctl); |
468 | ak4114->kctls[idx] = NULL; | 476 | ak4114->kctls[idx] = NULL; |
@@ -526,6 +534,9 @@ static void ak4114_notify(struct ak4114 *ak4114, | |||
526 | if (c0 & AK4114_DTSCD) | 534 | if (c0 & AK4114_DTSCD) |
527 | snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE, | 535 | snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE, |
528 | &ak4114->kctls[13]->id); | 536 | &ak4114->kctls[13]->id); |
537 | if (c0 & AK4114_UNLCK) | ||
538 | snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE, | ||
539 | &ak4114->kctls[14]->id); | ||
529 | } | 540 | } |
530 | 541 | ||
531 | int snd_ak4114_external_rate(struct ak4114 *ak4114) | 542 | int snd_ak4114_external_rate(struct ak4114 *ak4114) |
@@ -587,7 +598,7 @@ static void ak4114_stats(struct work_struct *work) | |||
587 | { | 598 | { |
588 | struct ak4114 *chip = container_of(work, struct ak4114, work.work); | 599 | struct ak4114 *chip = container_of(work, struct ak4114, work.work); |
589 | 600 | ||
590 | if (chip->init) | 601 | if (!chip->init) |
591 | snd_ak4114_check_rate_and_errors(chip, 0); | 602 | snd_ak4114_check_rate_and_errors(chip, 0); |
592 | 603 | ||
593 | schedule_delayed_work(&chip->work, HZ / 10); | 604 | schedule_delayed_work(&chip->work, HZ / 10); |