summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPavel Hofman <dustin@seznam.cz>2007-04-05 17:07:30 +0200
committerJaroslav Kysela <perex@suse.cz>2007-05-11 16:55:57 +0200
commitc4116ae717d6456884232642bae806125d39f1d3 (patch)
treea60ed2867b07e8dcb8fe96a7c37e6c28d954b9c4 /sound
parent208eee2a9db7e70109583e3481371967cd1d4764 (diff)
downloadlinux-c4116ae717d6456884232642bae806125d39f1d3.tar.gz
linux-c4116ae717d6456884232642bae806125d39f1d3.tar.bz2
linux-c4116ae717d6456884232642bae806125d39f1d3.zip
[ALSA] Fix misc bugs in i2c/others/ak4114.c
* correct register for 'IEC958 Non-PCM Bitstream', 'IEC958 DTS Bitstream' to use AK4114_REG_RCS0 * correct check for control name: if (strstr(kctl->id.name, 'Playback')) * correct check: if (!chip->init) in snd_ak4114_external_rate * added PCM control 'IEC958 PPL Lock Status' Signed-off-by: Pavel Hofman <dustin@seznam.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/i2c/other/ak4114.c19
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[] = {
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.info = snd_ak4114_in_bit_info,
.get = snd_ak4114_in_bit_get,
- .private_value = (6<<8) | AK4114_REG_RCS1,
+ .private_value = (6<<8) | AK4114_REG_RCS0,
},
{
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -443,7 +443,15 @@ static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = {
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.info = snd_ak4114_in_bit_info,
.get = snd_ak4114_in_bit_get,
- .private_value = (3<<8) | AK4114_REG_RCS1,
+ .private_value = (3<<8) | AK4114_REG_RCS0,
+},
+{
+ .iface = SNDRV_CTL_ELEM_IFACE_PCM,
+ .name = "IEC958 PPL Lock Status",
+ .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
+ .info = snd_ak4114_in_bit_info,
+ .get = snd_ak4114_in_bit_get,
+ .private_value = (1<<31) | (4<<8) | AK4114_REG_RCS0,
}
};
@@ -462,7 +470,7 @@ int snd_ak4114_build(struct ak4114 *ak4114,
kctl = snd_ctl_new1(&snd_ak4114_iec958_controls[idx], ak4114);
if (kctl == NULL)
return -ENOMEM;
- if (!strstr(kctl->id.name, "Playback")) {
+ if (strstr(kctl->id.name, "Playback")) {
if (ply_substream == NULL) {
snd_ctl_free_one(kctl);
ak4114->kctls[idx] = NULL;
@@ -526,6 +534,9 @@ static void ak4114_notify(struct ak4114 *ak4114,
if (c0 & AK4114_DTSCD)
snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE,
&ak4114->kctls[13]->id);
+ if (c0 & AK4114_UNLCK)
+ snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE,
+ &ak4114->kctls[14]->id);
}
int snd_ak4114_external_rate(struct ak4114 *ak4114)
@@ -587,7 +598,7 @@ static void ak4114_stats(struct work_struct *work)
{
struct ak4114 *chip = container_of(work, struct ak4114, work.work);
- if (chip->init)
+ if (!chip->init)
snd_ak4114_check_rate_and_errors(chip, 0);
schedule_delayed_work(&chip->work, HZ / 10);