onyx 64 sound/aoa/codecs/snd-aoa-codec-onyx.c #define codec_to_onyx(c) container_of(c, struct onyx, codec) onyx 72 sound/aoa/codecs/snd-aoa-codec-onyx.c *value = onyx->cache[reg-FIRSTREGISTER]; onyx 75 sound/aoa/codecs/snd-aoa-codec-onyx.c v = i2c_smbus_read_byte_data(&onyx->i2c, reg); onyx 79 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->cache[ONYX_REG_CONTROL-FIRSTREGISTER] = *value; onyx 87 sound/aoa/codecs/snd-aoa-codec-onyx.c result = i2c_smbus_write_byte_data(&onyx->i2c, reg, value); onyx 89 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->cache[reg-FIRSTREGISTER] = value; onyx 121 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 124 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 125 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, &l); onyx 126 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, &r); onyx 127 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 138 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 148 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 149 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, &l); onyx 150 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, &r); onyx 154 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 158 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, onyx 161 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, onyx 164 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 197 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 200 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 201 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &ig); onyx 202 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 213 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 219 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 220 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); onyx 225 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_ADC_CONTROL, n); onyx 226 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 257 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 260 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 261 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); onyx 262 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 273 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 274 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); onyx 278 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_ADC_CONTROL, v); onyx 279 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 317 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 320 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 321 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &c); onyx 322 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 333 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 337 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 338 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->analog_locked) onyx 341 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); onyx 348 sound/aoa/codecs/snd-aoa-codec-onyx.c err = onyx_write_register(onyx, ONYX_REG_DAC_CONTROL, c); onyx 351 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 374 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 381 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 382 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, address, &c); onyx 383 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 393 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 402 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 403 sound/aoa/codecs/snd-aoa-codec-onyx.c if (spdiflock && onyx->spdif_locked) { onyx 408 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, address, &v); onyx 413 sound/aoa/codecs/snd-aoa-codec-onyx.c err = onyx_write_register(onyx, address, c); onyx 416 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 495 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 498 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 499 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO1, &v); onyx 502 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO2, &v); onyx 505 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO3, &v); onyx 508 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); onyx 510 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 518 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = snd_kcontrol_chip(kcontrol); onyx 521 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 522 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO1, &v); onyx 524 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DIG_INFO1, v); onyx 527 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DIG_INFO2, v); onyx 529 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO3, &v); onyx 531 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DIG_INFO3, v); onyx 533 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); onyx 535 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DIG_INFO4, v); onyx 536 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 590 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->initialised) { onyx 592 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_read_register(onyx, ONYX_REG_CONTROL, &val)) onyx 599 sound/aoa/codecs/snd-aoa-codec-onyx.c regs[i] = onyx->cache[register_map[i]-FIRSTREGISTER]; onyx 603 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_write_register(onyx, register_map[i], regs[i])) onyx 606 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->initialised = 1; onyx 678 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 681 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 682 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); onyx 684 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); onyx 688 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 703 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 706 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 711 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); onyx 712 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_write_register(onyx, onyx 716 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->analog_locked = 1; onyx 734 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_write_register(onyx, onyx 738 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->spdif_locked = 1; onyx 744 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 752 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 754 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 755 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->open_count++; onyx 756 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 764 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 766 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 767 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->open_count--; onyx 768 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->open_count) onyx 769 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->spdif_locked = onyx->analog_locked = 0; onyx 770 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 778 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 780 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 784 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->all_amps_off(onyx->codec.gpio); onyx 787 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->all_amps_restore(onyx->codec.gpio); onyx 792 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 801 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 805 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 806 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_read_register(onyx, ONYX_REG_CONTROL, &v)) onyx 808 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_CONTROL, v | ONYX_ADPSV | ONYX_DAPSV); onyx 812 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 819 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = cii->codec_data; onyx 823 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_lock(&onyx->mutex); onyx 826 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); onyx 828 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); onyx 830 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); onyx 834 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_read_register(onyx, ONYX_REG_CONTROL, &v)) onyx 836 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_CONTROL, v & ~(ONYX_ADPSV | ONYX_DAPSV)); onyx 840 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_register_init(onyx); onyx 843 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_unlock(&onyx->mutex); onyx 868 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = codec_to_onyx(codec); onyx 874 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec.gpio || !onyx->codec.gpio->methods) { onyx 879 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); onyx 881 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); onyx 883 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); onyx 886 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_register_init(onyx)) { onyx 891 sound/aoa/codecs/snd-aoa-codec-onyx.c if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, onyx, &ops)) { onyx 897 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 0xF) == 0) onyx 901 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 0xC) == 0) { onyx 902 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec_info) onyx 903 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec_info = kmalloc(sizeof(struct codec_info), GFP_KERNEL); onyx 904 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec_info) onyx 906 sound/aoa/codecs/snd-aoa-codec-onyx.c ci = onyx->codec_info; onyx 912 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 3) == 0) { onyx 913 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec_info) onyx 914 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec_info = kmalloc(sizeof(struct codec_info), GFP_KERNEL); onyx 915 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec_info) onyx 917 sound/aoa/codecs/snd-aoa-codec-onyx.c ci = onyx->codec_info; onyx 924 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec.soundbus_dev->attach_codec(onyx->codec.soundbus_dev, onyx 926 sound/aoa/codecs/snd-aoa-codec-onyx.c ci, onyx)) { onyx 932 sound/aoa/codecs/snd-aoa-codec-onyx.c ctl = snd_ctl_new1(&n, onyx); \ onyx 935 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.soundbus_dev->pcm->device; \ onyx 942 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec.soundbus_dev->pcm) { onyx 945 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 0xC) == 0xC) onyx 947 sound/aoa/codecs/snd-aoa-codec-onyx.c else if (onyx->codec.connected & 4) onyx 948 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_set_capture_source(onyx, 0); onyx 950 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_set_capture_source(onyx, 1); onyx 951 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec.connected & 0xC) onyx 956 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec.connected & 1) { onyx 965 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec.connected & 2) { onyx 969 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 3) == 3) onyx 972 sound/aoa/codecs/snd-aoa-codec-onyx.c if ((onyx->codec.connected & 3) == 2) { onyx 973 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); onyx 975 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx_write_register(onyx, ONYX_REG_DIG_INFO4, v); onyx 983 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); onyx 984 sound/aoa/codecs/snd-aoa-codec-onyx.c snd_device_free(aoa_get_card(), onyx); onyx 990 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = codec_to_onyx(codec); onyx 992 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx->codec.soundbus_dev) { onyx 996 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); onyx 1005 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx; onyx 1008 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx = kzalloc(sizeof(struct onyx), GFP_KERNEL); onyx 1010 sound/aoa/codecs/snd-aoa-codec-onyx.c if (!onyx) onyx 1013 sound/aoa/codecs/snd-aoa-codec-onyx.c mutex_init(&onyx->mutex); onyx 1014 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->i2c.driver = &onyx_driver; onyx 1015 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->i2c.adapter = adapter; onyx 1016 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->i2c.addr = addr & 0x7f; onyx 1017 sound/aoa/codecs/snd-aoa-codec-onyx.c strlcpy(onyx->i2c.name, "onyx audio codec", I2C_NAME_SIZE); onyx 1019 sound/aoa/codecs/snd-aoa-codec-onyx.c if (i2c_attach_client(&onyx->i2c)) { onyx 1026 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx_read_register(onyx, ONYX_REG_CONTROL, &dummy) != 0) { onyx 1027 sound/aoa/codecs/snd-aoa-codec-onyx.c i2c_detach_client(&onyx->i2c); onyx 1032 sound/aoa/codecs/snd-aoa-codec-onyx.c strlcpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN); onyx 1033 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.owner = THIS_MODULE; onyx 1034 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.init = onyx_init_codec; onyx 1035 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.exit = onyx_exit_codec; onyx 1036 sound/aoa/codecs/snd-aoa-codec-onyx.c onyx->codec.node = of_node_get(node); onyx 1038 sound/aoa/codecs/snd-aoa-codec-onyx.c if (aoa_codec_register(&onyx->codec)) { onyx 1039 sound/aoa/codecs/snd-aoa-codec-onyx.c i2c_detach_client(&onyx->i2c); onyx 1045 sound/aoa/codecs/snd-aoa-codec-onyx.c kfree(onyx); onyx 1085 sound/aoa/codecs/snd-aoa-codec-onyx.c struct onyx *onyx = container_of(client, struct onyx, i2c); onyx 1090 sound/aoa/codecs/snd-aoa-codec-onyx.c aoa_codec_unregister(&onyx->codec); onyx 1091 sound/aoa/codecs/snd-aoa-codec-onyx.c of_node_put(onyx->codec.node); onyx 1092 sound/aoa/codecs/snd-aoa-codec-onyx.c if (onyx->codec_info) onyx 1093 sound/aoa/codecs/snd-aoa-codec-onyx.c kfree(onyx->codec_info); onyx 1094 sound/aoa/codecs/snd-aoa-codec-onyx.c kfree(onyx);