Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/firewire/oxfw/oxfw-stream.c
void snd_oxfw_stream_lock_release(struct snd_oxfw *oxfw) { spin_lock_irq(&oxfw->lock); if (WARN_ON(oxfw->dev_lock_count <= 0)) goto end; if (--oxfw->dev_lock_count == 0) snd_oxfw_stream_lock_changed(oxfw); end: spin_unlock_irq(&oxfw->lock); }
[ 1, 0 ]
Linux Kernel
sound/firewire/oxfw/oxfw.c
static int oxfw_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry) { struct snd_card *card; struct snd_oxfw *oxfw; int err; if (entry->vendor_id == VENDOR_LOUD && entry->model_id == 0 && !detect_loud_models(unit)) return -ENODEV; err = snd_card_new(&un...
[ 1, 0 ]
Linux Kernel
sound/firewire/oxfw/oxfw.c
static void oxfw_remove(struct fw_unit *unit) { struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); snd_card_free(oxfw->card); }
[ 0, 0 ]
Linux Kernel
sound/firewire/packets-buffer.c
void iso_packets_buffer_destroy(struct iso_packets_buffer *b, struct fw_unit *unit) { fw_iso_buffer_destroy(&b->iso_buffer, fw_parent_device(unit)->card); kfree(b->packets); }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/amdtp-tascam.c
static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *descs, unsigned int packets, struct snd_pcm_substream *pcm) { unsigned int pcm_frames = 0; i...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-hwdep.c
static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait) { struct snd_tscm *tscm = hwdep->private_data; __poll_t events; poll_wait(file, &tscm->hwdep_wait, wait); spin_lock_irq(&tscm->lock); if (tscm->dev_lock_changed || tscm->push_pos != tscm->pul...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-hwdep.c
static int hwdep_get_info(struct snd_tscm *tscm, void __user *arg) { struct fw_device *dev = fw_parent_device(tscm->unit); struct snd_firewire_get_info info; memset(&info, 0, sizeof(info)); info.type = SNDRV_FIREWIRE_TYPE_TASCAM; info.card = dev->card->index; *(__be32 *)&info.guid[0] = cpu_to_be32(dev->co...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-hwdep.c
static int hwdep_unlock(struct snd_tscm *tscm) { int err; spin_lock_irq(&tscm->lock); if (tscm->dev_lock_count == -1) { tscm->dev_lock_count = 0; err = 0; } else { err = -EBADFD; } spin_unlock_irq(&tscm->lock); return err; }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-hwdep.c
static int tscm_hwdep_state(struct snd_tscm *tscm, void __user *arg) { if (copy_to_user(arg, tscm->state, sizeof(tscm->state))) return -EFAULT; return 0; }
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-midi.c
static int midi_playback_close(struct snd_rawmidi_substream *substream) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-midi.c
static void midi_playback_drain(struct snd_rawmidi_substream *substream) { struct snd_tscm *tscm = substream->rmidi->private_data; snd_fw_async_midi_port_finish(&tscm->out_ports[substream->number]); }
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
static int pcm_open(struct snd_pcm_substream *substream) { struct snd_tscm *tscm = substream->private_data; struct amdtp_domain *d = &tscm->domain; enum snd_tscm_clock clock; int err; err = snd_tscm_stream_lock_try(tscm); if (err < 0) return err; err = pcm_init_hw_params(tscm, substream); if (err ...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
static int pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct snd_tscm *tscm = substream->private_data; int err = 0; if (substream->runtime->state == SNDRV_PCM_STATE_OPEN) { unsigned int rate = params_rate(hw_params); unsigned int fr...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
static int pcm_capture_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_tscm *tscm = substream->private_data; switch (cmd) { case SNDRV_PCM_TRIGGER_START: amdtp_stream_pcm_trigger(&tscm->tx_stream, substream); break; case SNDRV_PCM_TRIGGER_STOP: amdtp_stream_pcm_trigger(&tscm->tx...
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
static int pcm_playback_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_tscm *tscm = substream->private_data; switch (cmd) { case SNDRV_PCM_TRIGGER_START: amdtp_stream_pcm_trigger(&tscm->rx_stream, substream); break; case SNDRV_PCM_TRIGGER_STOP: amdtp_stream_pcm_trigger(&tscm->r...
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
static int pcm_capture_ack(struct snd_pcm_substream *substream) { struct snd_tscm *tscm = substream->private_data; return amdtp_domain_stream_pcm_ack(&tscm->domain, &tscm->tx_stream); }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-pcm.c
int snd_tscm_create_pcm_devices(struct snd_tscm *tscm) { static const struct snd_pcm_ops capture_ops = { .open = pcm_open, .close = pcm_close, .hw_params = pcm_hw_params, .hw_free = pcm_hw_free, .prepare = pcm_capture_prepare, .trigger = pcm_capture_trigger, .pointer = pcm_c...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-proc.c
void snd_tscm_proc_init(struct snd_tscm *tscm) { struct snd_info_entry *root; root = snd_info_create_card_entry(tscm->card, "firewire", tscm->card->proc_root); if (root == NULL) return; root->mode = S_IFDIR | 0555; add_node(tscm, root, "firmware", proc_read_firmware); }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-stream.c
int snd_tscm_stream_get_rate(struct snd_tscm *tscm, unsigned int *rate) { u32 data; int err; err = get_clock(tscm, &data); if (err < 0) return err; data = (data & 0xff000000) >> 24; if ((data & 0x0f) == 0x01) *rate = 44100; else if ((data & 0x0f) == 0x02) *rate = 48000; else return -E...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-stream.c
void snd_tscm_stream_update_duplex(struct snd_tscm *tscm) { amdtp_domain_stop(&tscm->domain); amdtp_stream_pcm_abort(&tscm->tx_stream); amdtp_stream_pcm_abort(&tscm->rx_stream); }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-transaction.c
void snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port) { port->idling = true; port->error = false; port->running_status = 0; port->on_sysex = false; }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam-transaction.c
static void handle_midi_tx(struct fw_card *card, struct fw_request *request, int tcode, int destination, int source, int generation, unsigned long long offset, void *data, size_t length, void *callback_data) { struct snd_tscm *tscm = cal...
[ 1, 1 ]
Linux Kernel
sound/firewire/tascam/tascam-transaction.c
void snd_tscm_transaction_unregister(struct snd_tscm *tscm) { __be32 reg; if (tscm->async_handler.callback_data == NULL) return; reg = cpu_to_be32(0x0000008e); snd_fw_transaction(tscm->unit, TCODE_WRITE_QUADLET_REQUEST, TSCM_ADDR_BASE + TSCM_OFFSET_LED_POWER, &reg, sizeof(reg), ...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam.c
static int identify_model(struct snd_tscm *tscm) { struct fw_device *fw_dev = fw_parent_device(tscm->unit); const u32 *config_rom = fw_dev->config_rom; char model[9]; unsigned int i; u8 c; if (fw_dev->config_rom_length < 30) { dev_err(&tscm->unit->device, "Configuration ROM is too short.\n"); retur...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam.c
static int snd_tscm_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry) { struct snd_card *card; struct snd_tscm *tscm; int err; err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, sizeof(*tscm), &card); if (err < 0) return err; card->private_free =...
[ 1, 0 ]
Linux Kernel
sound/firewire/tascam/tascam.c
static void snd_tscm_remove(struct fw_unit *unit) { struct snd_tscm *tscm = dev_get_drvdata(&unit->device); snd_card_free(tscm->card); }
[ 0, 0 ]
Linux Kernel
sound/firewire/tascam/tascam.h
static inline void snd_fw_async_midi_port_finish(struct snd_fw_async_midi_port *port) { port->substream = NULL; cancel_work_sync(&port->work); port->error = false; }
[ 0, 0 ]
Linux Kernel
sound/hda/array.c
void *snd_array_new(struct snd_array *array) { if (snd_BUG_ON(!array->elem_size)) return NULL; if (array->used >= array->alloced) { int num = array->alloced + array->alloc_align; int oldsize = array->alloced * array->elem_size; int size = (num + 1) * array->elem_size; void *nlist; if (snd_BU...
[ 1, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_bus.c
static inline struct hdac_driver *get_hdrv(struct device *dev) { struct hdac_driver *hdrv = drv_to_hdac_driver(dev->driver); return hdrv; }
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_bus.c
int snd_hda_ext_driver_register(struct hdac_driver *drv) { drv->type = HDA_DEV_ASOC; drv->driver.bus = &snd_hda_bus_type; if (drv->probe) drv->driver.probe = hda_ext_drv_probe; if (drv->remove) drv->driver.remove = hdac_ext_drv_remove; if (drv->shutdown) drv->driver.shutdown = hdac_ext_drv_shutdo...
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_controller.c
void snd_hdac_ext_bus_ppcap_enable(struct hdac_bus *bus, bool enable) { if (!bus->ppcap) { dev_err(bus->dev, "Address of PP capability is NULL"); return; } if (enable) snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_GPROCEN, AZX_PPCTL_GPROCEN); else snd_hdac_updat...
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_controller.c
struct hdac_ext_link * snd_hdac_ext_bus_get_hlink_by_name(struct hdac_bus *bus, const char *codec_name) { int bus_idx, addr; if (sscanf(codec_name, "ehdaudio%dD%d", &bus_idx, &addr) != 2) return NULL; if (bus->idx != bus_idx) return NULL; if (addr < 0 || addr > 31) ...
[ 1, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_controller.c
void snd_hdac_ext_bus_link_set_stream_id(struct hdac_ext_link *link, int stream) { snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 1 << stream); }
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_stream.c
void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, struct hdac_ext_stream *hext_stream, bool decouple) { spin_lock_irq(&bus->reg_lock); snd_hdac_ext_stream_decouple_locked(bus, hext_stream, decouple); spin_unlock_irq(&bus->reg_lock); }
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_stream.c
void snd_hdac_ext_stream_start(struct hdac_ext_stream *hext_stream) { snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, AZX_PPLCCTL_RUN); }
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_stream.c
static struct hdac_ext_stream * hdac_ext_host_dma_stream_assign(struct hdac_bus *bus, struct snd_pcm_substream *substream) { struct hdac_ext_stream *res = NULL; struct hdac_stream *hstream = NULL; if (!bus->ppcap) { dev_err(bus->dev, "stream type not supported\n"); return...
[ 0, 0 ]
Linux Kernel
sound/hda/ext/hdac_ext_stream.c
struct hdac_ext_stream * snd_hdac_ext_stream_assign(struct hdac_bus *bus, struct snd_pcm_substream *substream, int type) { struct hdac_ext_stream *hext_stream = NULL; struct hdac_stream *hstream = NULL; switch (type) { case HDAC_EXT_STREAM_TYPE_COUPLED: hstream = snd_hdac_stream_...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_bus.c
void snd_hdac_bus_exit(struct hdac_bus *bus) { WARN_ON(!list_empty(&bus->stream_list)); WARN_ON(!list_empty(&bus->codec_list)); cancel_work_sync(&bus->unsol_work); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_bus.c
int snd_hdac_bus_exec_verb_unlocked(struct hdac_bus *bus, unsigned int addr, unsigned int cmd, unsigned int *res) { unsigned int tmp; int err; if (cmd == ~0) return -EINVAL; if (res) *res = -1; else if (bus->sync_write) res = &tmp; for (;;) { trace_hda_s...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_bus.c
static void snd_hdac_bus_process_unsol_events(struct work_struct *work) { struct hdac_bus *bus = container_of(work, struct hdac_bus, unsol_work); struct hdac_device *codec; struct hdac_driver *drv; unsigned int rp, caddr, res; spin_lock_irq(&bus->reg_lock); while (bus->unsol_rp != bus->unsol_wp) { rp =...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_bus.c
void snd_hdac_codec_link_up(struct hdac_device *codec) { struct hdac_bus *bus = codec->bus; if (bus->ops->link_power) bus->ops->link_power(codec, true); else snd_hdac_bus_link_power(codec, true); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_bus.c
void snd_hdac_codec_link_down(struct hdac_device *codec) { struct hdac_bus *bus = codec->bus; if (bus->ops->link_power) bus->ops->link_power(codec, false); else snd_hdac_bus_link_power(codec, false); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_component.c
static void hdac_acomp_release(struct device *dev, void *res) {}
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_component.c
int snd_hdac_acomp_register_notifier( struct hdac_bus *bus, const struct drm_audio_component_audio_ops *aops) { if (!bus->audio_component) return -ENODEV; bus->audio_component->audio_ops = aops; return 0; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_component.c
int snd_hdac_acomp_init(struct hdac_bus *bus, const struct drm_audio_component_audio_ops *aops, int (*match_master)(struct device *, int, void *), size_t extra_size) { struct component_match *match = NULL; struct device *dev = bus->dev; struc...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
static void hdac_wait_for_cmd_dmas(struct hdac_bus *bus) { unsigned long timeout; timeout = jiffies + msecs_to_jiffies(100); while ((snd_hdac_chip_readb(bus, RIRBCTL) & AZX_RBCTL_DMA_EN) && time_before(jiffies, timeout)) udelay(10); timeout = jiffies + msecs_to_jiffies(100); while ((snd_hdac_ch...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
void snd_hdac_bus_enter_link_reset(struct hdac_bus *bus) { unsigned long timeout; snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_RESET, 0); timeout = jiffies + msecs_to_jiffies(100); while ((snd_hdac_chip_readb(bus, GCTL) & AZX_GCTL_RESET) && time_before(jiffies, timeout)) usleep_range(500, 1000); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus) { unsigned long timeout; snd_hdac_chip_updateb(bus, GCTL, AZX_GCTL_RESET, AZX_GCTL_RESET); timeout = jiffies + msecs_to_jiffies(100); while (!snd_hdac_chip_readb(bus, GCTL) && time_before(jiffies, timeout)) usleep_range(500, 1000); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
static void azx_int_clear(struct hdac_bus *bus) { struct hdac_stream *azx_dev; list_for_each_entry(azx_dev, &bus->stream_list, list) snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* clear STATESTS */ snd_hdac_chip_writew(bus, STATESTS, STATESTS_INT_MASK); /* clear rirb status */ snd_hdac_ch...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
void snd_hdac_bus_free_stream_pages(struct hdac_bus *bus) { struct hdac_stream *s; list_for_each_entry(s, &bus->stream_list, list) { if (s->bdl.area) snd_dma_free_pages(&s->bdl); } if (bus->rb.area) snd_dma_free_pages(&bus->rb); if (bus->posbuf.area) snd_dma_free_pages(&bus->posbuf); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_controller.c
void snd_hdac_bus_link_power(struct hdac_device *codec, bool enable) { if (enable) set_bit(codec->addr, &codec->bus->codec_powered); else clear_bit(codec->addr, &codec->bus->codec_powered); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_device_register(struct hdac_device *codec) { int err; err = device_add(&codec->dev); if (err < 0) return err; mutex_lock(&codec->widget_lock); err = hda_widget_sysfs_init(codec); mutex_unlock(&codec->widget_lock); if (err < 0) { device_del(&codec->dev); return err; } return ...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name) { char *newname; if (!name) return 0; newname = kstrdup(name, GFP_KERNEL); if (!newname) return -ENOMEM; kfree(codec->chip_name); codec->chip_name = newname; return 0; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, unsigned int verb, unsigned int parm, unsigned int *res) { unsigned int cmd = snd_hdac_make_cmd(codec, nid, verb, parm); return snd_hdac_exec_verb(codec, cmd, 0, res); }
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid, unsigned int parm, unsigned int val) { unsigned int verb = (AC_VERB_PARAMETERS << 8) | (nid << 20) | parm; int err; if (!codec->regmap) return -EINVAL; codec->caps_overwriting = true; err = snd_hdac_regmap_wr...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_refresh_widgets(struct hdac_device *codec) { hda_nid_t start_nid; int nums, err = 0; mutex_lock(&codec->widget_lock); nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid); if (!start_nid || nums <= 0 || nums >= 0xff) { dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n", cod...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_keep_power_up(struct hdac_device *codec) { if (!atomic_inc_not_zero(&codec->in_pm)) { int ret = pm_runtime_get_if_in_use(&codec->dev); if (!ret) return -1; if (ret < 0) return 0; } return 1; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_power_down_pm(struct hdac_device *codec) { if (atomic_dec_if_positive(&codec->in_pm) < 0) return snd_hdac_power_down(codec); return 0; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_device.c
static unsigned int query_pcm_param(struct hdac_device *codec, hda_nid_t nid) { unsigned int val = 0; if (nid != codec->afg && (get_wcaps(codec, nid) & AC_WCAP_FORMAT_OVRD)) val = snd_hdac_read_parm(codec, nid, AC_PAR_PCM); if (!val || val == -1) val = snd_hdac_read_parm(codec, codec->afg, AC_PAR_PCM); ...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_device.c
static unsigned int query_stream_param(struct hdac_device *codec, hda_nid_t nid) { unsigned int streams = snd_hdac_read_parm(codec, nid, AC_PAR_STREAM); if (!streams || streams == -1) streams = snd_hdac_read_parm(codec, codec->afg, AC_PAR_STREAM); if (!streams || strea...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_device.c
int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid, int flags, unsigned int verb, unsigned int parm) { return codec_write(hdac, nid, flags, verb, parm); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_i915.c
static bool connectivity_check(struct pci_dev *i915, struct pci_dev *hdac) { struct pci_bus *bus_a = i915->bus, *bus_b = hdac->bus; if (bus_a == bus_b) return true; /* * on i915 discrete GPUs with embedded HDA audio, the two * devices are connected via 2nd level PCI bridge */ bus_a = bus_a->paren...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_i915.c
int snd_hdac_i915_init(struct hdac_bus *bus) { struct drm_audio_component *acomp; int err; if (!i915_gfx_present(to_pci_dev(bus->dev))) return -ENODEV; err = snd_hdac_acomp_init(bus, NULL, i915_component_master_match, sizeof(struct i915_audio_component) - sizeof(*acomp)); ...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_regmap.c
static bool hda_writeable_reg(struct device *dev, unsigned int reg) { struct hdac_device *codec = dev_to_hdac_dev(dev); unsigned int verb = get_verb(reg); const unsigned int *v; int i; snd_array_for_each(&codec->vendor_verbs, i, v) { if (verb == *v) return true; } if (codec->caps_overwriting) ...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_regmap.c
static bool hda_readable_reg(struct device *dev, unsigned int reg) { struct hdac_device *codec = dev_to_hdac_dev(dev); unsigned int verb = get_verb(reg); if (codec->caps_overwriting) return true; switch (verb) { case AC_VERB_PARAMETERS: case AC_VERB_GET_CONNECT_LIST: case AC_VERB_GET_SUBSYSTEM_ID: ...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_regmap.c
int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, unsigned int *val) { return __snd_hdac_regmap_read_raw(codec, reg, val, false); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_regmap.c
static int reg_raw_update_once(struct hdac_device *codec, unsigned int reg, unsigned int mask, unsigned int val) { unsigned int orig; int err; if (!codec->regmap) return reg_raw_update(codec, reg, mask, val); mutex_lock(&codec->regmap_lock); regcache_cache_only(codec->reg...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; unsigned int channels = runtime->channels, rate = runtime->rate, bits_per_sample = runtime->sample_bits, max_sdo_lin...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev, int idx, int direction, int tag) { azx_dev->bus = bus; azx_dev->sd_addr = bus->remap_addr + (0x20 * idx + 0x80); /* int mask: SDI0=0x01, SDI1=0x02, ... SDO3=0x80 */ azx_dev->sd_int_sta_mask = 1 << idx; azx_...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start) { struct hdac_bus *bus = azx_dev->bus; int stripe_ctl; trace_snd_hdac_stream_start(bus, azx_dev); azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK); if (!fresh_start) azx_dev->start_wallclk -= azx_dev->period_wallclk; ...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stop_streams(struct hdac_bus *bus) { struct hdac_stream *stream; list_for_each_entry(stream, &bus->stream_list, list) snd_hdac_stream_stop(stream); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev) { snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0); snd_hdac_stream_writel(azx_dev, SD_BDLPU, 0); snd_hdac_stream_writel(azx_dev, SD_CTL, 0); azx_dev->bufsize = 0; azx_dev->period_bytes = 0; azx_dev->format_val = 0; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
struct hdac_stream * snd_hdac_stream_assign(struct hdac_bus *bus, struct snd_pcm_substream *substream) { struct hdac_stream *azx_dev; struct hdac_stream *res = NULL; int key = (substream->pcm->device << 16) | (substream->number << 2) | (substream->stream + 1); spin_lock_irq(...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev) { azx_dev->opened = 0; azx_dev->running = 0; azx_dev->substream = NULL; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
struct hdac_stream *snd_hdac_get_stream(struct hdac_bus *bus, int dir, int stream_tag) { struct hdac_stream *s; list_for_each_entry(s, &bus->stream_list, list) { if (s->direction == dir && s->stream_tag == stream_tag) return s; } return NULL; }
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev, unsigned int streams) { struct hdac_bus *bus = azx_dev->bus; struct snd_pcm_runtime *runtime = azx_dev->substream->runtime; struct hdac_stream *s; bool inited = false; u64 cycle_last = 0; int i = 0; l...
[ 1, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set, unsigned int streams, unsigned int reg) { struct hdac_bus *bus = azx_dev->bus; unsigned int val; if (!reg) reg = AZX_REG_SSYNC; val = _snd_hdac_chip_readl(bus, reg); if (set) val |= streams; e...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
int snd_hdac_stream_get_spbmaxfifo(struct hdac_bus *bus, struct hdac_stream *azx_dev) { if (!bus->spbcap) { dev_err(bus->dev, "Address of SPB capability is NULL\n"); return -EINVAL; } return readl(azx_dev->fifo_addr); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_stream_drsm_enable(struct hdac_bus *bus, bool enable, int index) { u32 mask = 0; if (!bus->drsmcap) { dev_err(bus->dev, "Address of DRSM capability is NULL\n"); return; } mask |= (1 << index); if (enable) snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, mask); else snd...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
int snd_hdac_stream_set_dpibr(struct hdac_bus *bus, struct hdac_stream *azx_dev, u32 value) { if (!bus->drsmcap) { dev_err(bus->dev, "Address of DRSM capability is NULL\n"); return -EINVAL; } writel(value, azx_dev->dpibr_addr); return 0; }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_stream.c
void snd_hdac_dsp_cleanup(struct hdac_stream *azx_dev, struct snd_dma_buffer *dmab) { struct hdac_bus *bus = azx_dev->bus; if (!dmab->area || !azx_dev->locked) return; snd_hdac_dsp_lock(azx_dev); snd_hdac_stream_writel(azx_dev, SD_BDLPL, 0); snd_hdac_stream_writel(azx_dev, SD_...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_sysfs.c
static void widget_release(struct kobject *kobj) { kfree(kobj); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_sysfs.c
static bool has_pcm_cap(struct hdac_device *codec, hda_nid_t nid) { if (nid == codec->afg || nid == codec->mfg) return true; switch (get_wcaps_type(get_wcaps(codec, nid))) { case AC_WID_AUD_OUT: case AC_WID_AUD_IN: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_sysfs.c
static ssize_t pcm_caps_show(struct hdac_device *codec, hda_nid_t nid, struct widget_attribute *attr, char *buf) { if (!has_pcm_cap(codec, nid)) return 0; return sysfs_emit(buf, "0x%08x\n", snd_hdac_read_parm(codec, nid, AC_PAR_PCM)); }
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_sysfs.c
static ssize_t power_caps_show(struct hdac_device *codec, hda_nid_t nid, struct widget_attribute *attr, char *buf) { if (nid != codec->afg && !(get_wcaps(codec, nid) & AC_WCAP_POWER)) return 0; return sysfs_emit(buf, "0x%08x\n", snd_hdac_read_parm(codec, nid, ...
[ 0, 0 ]
Linux Kernel
sound/hda/hdac_sysfs.c
int hda_widget_sysfs_reinit(struct hdac_device *codec, hda_nid_t start_nid, int num_nodes) { struct hdac_widget_tree *tree; hda_nid_t end_nid = start_nid + num_nodes; hda_nid_t nid; int i; if (!codec->widgets) return 0; tree = kmemdup(codec->widgets, sizeof(*tree), GFP_KERN...
[ 1, 0 ]
Linux Kernel
sound/hda/hda_bus_type.c
static int hda_uevent(struct device *dev, struct kobj_uevent_env *env) { char modalias[32]; snd_hdac_codec_modalias(dev_to_hdac_dev(dev), modalias, sizeof(modalias)); if (add_uevent_var(env, "MODALIAS=%s", modalias)) return -ENOMEM; return 0; }
[ 1, 0 ]
Linux Kernel
sound/hda/hdmi_chmap.c
void snd_hdac_print_channel_allocation(int spk_alloc, char *buf, int buflen) { int i, j; for (i = 0, j = 0; i < ARRAY_SIZE(cea_speaker_allocation_names); i++) { if (spk_alloc & (1 << i)) j += scnprintf(buf + j, buflen - j, " %s", cea_speaker_allocation_names[i]); } buf[j] = '\0';...
[ 1, 0 ]
Linux Kernel
sound/hda/hdmi_chmap.c
static int hdmi_chmap_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); struct hdac_chmap *chmap = info->private_data; int pcm_idx = kcontrol->private_value; unsigned char pcm_chmap[8]; int i; ...
[ 1, 0 ]
Linux Kernel
sound/hda/intel-sdw-acpi.c
static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, void *cdata, void **return_value) { struct sdw_intel_acpi_info *info = cdata; acpi_status status; u64 adr; status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr); if (ACPI_FAILURE(status)) ...
[ 0, 0 ]
Linux Kernel
sound/hda/local.h
static inline unsigned int get_wcaps_channels(u32 wcaps) { unsigned int chans; chans = (wcaps & AC_WCAP_CHAN_CNT_EXT) >> 13; chans = (chans + 1) * 2; return chans; }
[ 0, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_select_corudata(struct snd_i2c_device *device, int udata) { struct cs8427 *chip = device->private_data; int err; udata = udata ? CS8427_BSEL : 0; if (udata != (chip->regmap[CS8427_REG_CSDATABUF] & udata)) { chip->regmap[CS8427_REG_CSDATABUF] &= ~...
[ 0, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_send_corudata(struct snd_i2c_device *device, int udata, unsigned char *ndata, int count) { struct cs8427 *chip = device->private_data; char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status; unsigned char data[32]; int err, idx; i...
[ 1, 0 ]
Linux Kernel
sound/i2c/cs8427.c
int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr, unsigned int reset_timeout, struct snd_i2c_device **r_cs8427) { int err; struct cs8427 *chip; struct snd_i2c_device *device; err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), &devic...
[ 1, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol); unsigned char reg = CS8427_REG_QSUBCODE; int err; snd_i2c_lock(device->bus); err = snd_i2c_sendbytes(device...
[ 1, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol); struct cs8427 *chip = device->private_data; unsigned char *status = kcontrol->private_value ? chip->playback.pcm_statu...
[ 1, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/cs8427.c
static int snd_cs8427_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { memset(ucontrol->value.iec958.status, 0xff, 24); return 0; }
[ 1, 0 ]
Linux Kernel
sound/i2c/cs8427.c
int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, struct snd_pcm_substream *play_substream, struct snd_pcm_substream *cap_substream) { struct cs8427 *chip = cs8427->private_data; struct snd_kcontrol *kctl; unsigned int idx; int err; if (snd_BU...
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, unsigned char addr, struct snd_i2c_device **rdevice) { struct snd_i2c_device *device; *rdevice = NULL; if (snd_BUG_ON(!bus)) return -EINVAL; device = kzalloc(sizeof(*device), GFP_KERNEL); if (device == NULL) ...
[ 1, 0 ]