/linux-6.12.1/drivers/mtd/ubi/ |
D | upd.c | 41 static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) in set_update_marker() argument 46 dbg_gen("set update marker for volume %d", vol->vol_id); in set_update_marker() 48 if (vol->upd_marker) { in set_update_marker() 49 ubi_assert(ubi->vtbl[vol->vol_id].upd_marker); in set_update_marker() 54 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker() 58 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); in set_update_marker() 59 vol->upd_marker = 1; in set_update_marker() 74 static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol, in clear_update_marker() argument 80 dbg_gen("clear update marker for volume %d", vol->vol_id); in clear_update_marker() 82 vtbl_rec = ubi->vtbl[vol->vol_id]; in clear_update_marker() [all …]
|
D | vmt.c | 58 struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); in vol_attribute_show() local 59 struct ubi_device *ubi = vol->ubi; in vol_attribute_show() 62 if (!ubi->volumes[vol->vol_id] || ubi->volumes[vol->vol_id]->is_dead) { in vol_attribute_show() 67 vol->ref_count += 1; in vol_attribute_show() 71 ret = sprintf(buf, "%d\n", vol->reserved_pebs); in vol_attribute_show() 75 if (vol->vol_type == UBI_DYNAMIC_VOLUME) in vol_attribute_show() 81 ret = sprintf(buf, "%s\n", vol->name); in vol_attribute_show() 83 ret = sprintf(buf, "%d\n", vol->corrupted); in vol_attribute_show() 85 ret = sprintf(buf, "%d\n", vol->alignment); in vol_attribute_show() 87 ret = sprintf(buf, "%d\n", vol->usable_leb_size); in vol_attribute_show() [all …]
|
D | kapi.c | 67 void ubi_do_get_volume_info(struct ubi_device *ubi, struct ubi_volume *vol, in ubi_do_get_volume_info() argument 70 vi->vol_id = vol->vol_id; in ubi_do_get_volume_info() 72 vi->size = vol->reserved_pebs; in ubi_do_get_volume_info() 73 vi->used_bytes = vol->used_bytes; in ubi_do_get_volume_info() 74 vi->vol_type = vol->vol_type; in ubi_do_get_volume_info() 75 vi->corrupted = vol->corrupted; in ubi_do_get_volume_info() 76 vi->upd_marker = vol->upd_marker; in ubi_do_get_volume_info() 77 vi->alignment = vol->alignment; in ubi_do_get_volume_info() 78 vi->usable_leb_size = vol->usable_leb_size; in ubi_do_get_volume_info() 79 vi->name_len = vol->name_len; in ubi_do_get_volume_info() [all …]
|
D | cdev.c | 47 struct ubi_volume *vol = desc->vol; in get_exclusive() local 49 spin_lock(&vol->ubi->volumes_lock); in get_exclusive() 50 users = vol->readers + vol->writers + vol->exclusive + vol->metaonly; in get_exclusive() 53 ubi_err(vol->ubi, "%d users for volume %d", users, vol->vol_id); in get_exclusive() 56 vol->readers = vol->writers = vol->metaonly = 0; in get_exclusive() 57 vol->exclusive = 1; in get_exclusive() 61 spin_unlock(&vol->ubi->volumes_lock); in get_exclusive() 73 struct ubi_volume *vol = desc->vol; in revoke_exclusive() local 75 spin_lock(&vol->ubi->volumes_lock); in revoke_exclusive() 76 ubi_assert(vol->readers == 0 && vol->writers == 0 && vol->metaonly == 0); in revoke_exclusive() [all …]
|
D | vtbl.c | 128 struct ubi_volume *vol = re->desc->vol; in ubi_vtbl_rename_volumes() local 129 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes() 526 struct ubi_volume *vol; in init_volumes() local 534 vol = kzalloc(sizeof(struct ubi_volume), GFP_KERNEL); in init_volumes() 535 if (!vol) in init_volumes() 538 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes() 539 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes() 540 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes() 541 vol->upd_marker = vtbl[i].upd_marker; in init_volumes() 542 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes() [all …]
|
D | eba.c | 104 void ubi_eba_get_ldesc(struct ubi_volume *vol, int lnum, in ubi_eba_get_ldesc() argument 108 ldesc->pnum = vol->eba_tbl->entries[lnum].pnum; in ubi_eba_get_ldesc() 120 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, in ubi_eba_create_table() argument 170 void ubi_eba_copy_table(struct ubi_volume *vol, struct ubi_eba_table *dst, in ubi_eba_copy_table() argument 176 ubi_assert(dst && vol && vol->eba_tbl); in ubi_eba_copy_table() 178 src = vol->eba_tbl; in ubi_eba_copy_table() 191 void ubi_eba_replace_table(struct ubi_volume *vol, struct ubi_eba_table *tbl) in ubi_eba_replace_table() argument 193 ubi_eba_destroy_table(vol->eba_tbl); in ubi_eba_replace_table() 194 vol->eba_tbl = tbl; in ubi_eba_replace_table() 432 bool ubi_eba_is_mapped(struct ubi_volume *vol, int lnum) in ubi_eba_is_mapped() argument [all …]
|
D | ubi.h | 380 struct ubi_volume *vol; member 848 int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol); 849 void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol); 852 int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol, 854 int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol, 856 int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, 858 int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol, 869 static inline bool ubi_leb_valid(struct ubi_volume *vol, int lnum) in ubi_leb_valid() argument 871 return lnum >= 0 && lnum < vol->reserved_pebs; in ubi_leb_valid() 875 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, [all …]
|
D | debug.c | 125 void ubi_dump_vol_info(const struct ubi_volume *vol) in ubi_dump_vol_info() argument 128 pr_err("\tvol_id %d\n", vol->vol_id); in ubi_dump_vol_info() 129 pr_err("\treserved_pebs %d\n", vol->reserved_pebs); in ubi_dump_vol_info() 130 pr_err("\talignment %d\n", vol->alignment); in ubi_dump_vol_info() 131 pr_err("\tdata_pad %d\n", vol->data_pad); in ubi_dump_vol_info() 132 pr_err("\tvol_type %d\n", vol->vol_type); in ubi_dump_vol_info() 133 pr_err("\tname_len %d\n", vol->name_len); in ubi_dump_vol_info() 134 pr_err("\tusable_leb_size %d\n", vol->usable_leb_size); in ubi_dump_vol_info() 135 pr_err("\tused_ebs %d\n", vol->used_ebs); in ubi_dump_vol_info() 136 pr_err("\tused_bytes %lld\n", vol->used_bytes); in ubi_dump_vol_info() [all …]
|
D | misc.c | 52 struct ubi_volume *vol = ubi->volumes[vol_id]; in ubi_check_volume() local 54 if (vol->vol_type != UBI_STATIC_VOLUME) in ubi_check_volume() 57 buf = vmalloc(vol->usable_leb_size); in ubi_check_volume() 61 for (i = 0; i < vol->used_ebs; i++) { in ubi_check_volume() 66 if (i == vol->used_ebs - 1) in ubi_check_volume() 67 size = vol->last_eb_bytes; in ubi_check_volume() 69 size = vol->usable_leb_size; in ubi_check_volume() 71 err = ubi_eba_read_leb(ubi, vol, i, buf, 0, size, 1); in ubi_check_volume()
|
/linux-6.12.1/sound/ppc/ |
D | awacs.c | 141 int vol[2]; in snd_pmac_awacs_get_volume() local 144 vol[0] = (chip->awacs_reg[reg] >> lshift) & 0xf; in snd_pmac_awacs_get_volume() 145 vol[1] = chip->awacs_reg[reg] & 0xf; in snd_pmac_awacs_get_volume() 148 vol[0] = 0x0f - vol[0]; in snd_pmac_awacs_get_volume() 149 vol[1] = 0x0f - vol[1]; in snd_pmac_awacs_get_volume() 151 ucontrol->value.integer.value[0] = vol[0]; in snd_pmac_awacs_get_volume() 152 ucontrol->value.integer.value[1] = vol[1]; in snd_pmac_awacs_get_volume() 165 unsigned int vol[2]; in snd_pmac_awacs_put_volume() local 167 vol[0] = ucontrol->value.integer.value[0]; in snd_pmac_awacs_put_volume() 168 vol[1] = ucontrol->value.integer.value[1]; in snd_pmac_awacs_put_volume() [all …]
|
D | tumbler.c | 268 unsigned int vol[2]; in tumbler_put_master_volume() local 271 vol[0] = ucontrol->value.integer.value[0]; in tumbler_put_master_volume() 272 vol[1] = ucontrol->value.integer.value[1]; in tumbler_put_master_volume() 273 if (vol[0] >= ARRAY_SIZE(master_volume_table) || in tumbler_put_master_volume() 274 vol[1] >= ARRAY_SIZE(master_volume_table)) in tumbler_put_master_volume() 276 change = mix->master_vol[0] != vol[0] || in tumbler_put_master_volume() 277 mix->master_vol[1] != vol[1]; in tumbler_put_master_volume() 279 mix->master_vol[0] = vol[0]; in tumbler_put_master_volume() 280 mix->master_vol[1] = vol[1]; in tumbler_put_master_volume() 492 unsigned int vol; in tumbler_set_mono_volume() local [all …]
|
D | daca.c | 141 unsigned int vol[2]; in daca_put_volume() local 147 vol[0] = ucontrol->value.integer.value[0]; in daca_put_volume() 148 vol[1] = ucontrol->value.integer.value[1]; in daca_put_volume() 149 if (vol[0] > DACA_VOL_MAX || vol[1] > DACA_VOL_MAX) in daca_put_volume() 151 change = mix->left_vol != vol[0] || in daca_put_volume() 152 mix->right_vol != vol[1]; in daca_put_volume() 154 mix->left_vol = vol[0]; in daca_put_volume() 155 mix->right_vol = vol[1]; in daca_put_volume()
|
/linux-6.12.1/sound/pci/ice1712/ |
D | se.c | 25 } vol[8]; member 450 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_volume_get() 451 uc->value.integer.value[1] = spec->vol[n].ch2; in se200pci_cont_volume_get() 461 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_boolean_get() 471 uc->value.enumerated.item[0] = spec->vol[n].ch1; in se200pci_cont_enum_get() 482 spec->vol[n].ch1, in se200pci_cont_update() 483 spec->vol[n].ch2); in se200pci_cont_update() 488 spec->vol[n].ch1, in se200pci_cont_update() 489 spec->vol[n].ch2); in se200pci_cont_update() 494 spec->vol[n].ch1, in se200pci_cont_update() [all …]
|
D | phase.c | 47 unsigned short vol[8]; member 266 unsigned short vol, unsigned short master) in wm_set_vol() argument 270 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm_set_vol() 273 nvol = 127 - wm_vol[(((vol & ~WM_VOL_MUTE) * in wm_set_vol() 349 unsigned int vol = ucontrol->value.integer.value[ch]; in wm_master_vol_put() local 350 if (vol > WM_VOL_MAX) in wm_master_vol_put() 352 vol |= spec->master[ch] & WM_VOL_MUTE; in wm_master_vol_put() 353 if (vol != spec->master[ch]) { in wm_master_vol_put() 355 spec->master[ch] = vol; in wm_master_vol_put() 358 spec->vol[dac + ch], in wm_master_vol_put() [all …]
|
D | prodigy_hifi.c | 30 unsigned short vol[8]; member 259 ucontrol->value.integer.value[i] = spec->vol[i]; in ak4396_dac_vol_get() 273 if (ucontrol->value.integer.value[i] != spec->vol[i]) { in ak4396_dac_vol_put() 274 spec->vol[i] = ucontrol->value.integer.value[i]; in ak4396_dac_vol_put() 276 spec->vol[i] & 0xff); in ak4396_dac_vol_put() 313 unsigned short vol, unsigned short master) in wm_set_vol() argument 317 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm_set_vol() 320 nvol = (((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 128) in wm_set_vol() 330 unsigned short vol, unsigned short master) in wm8766_set_vol() argument 334 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm8766_set_vol() [all …]
|
D | maya44.c | 161 const struct maya_vol_info *vol = &vol_info[idx]; in maya_vol_info() local 166 uinfo->value.integer.max = vol->maxval; in maya_vol_info() 192 const struct maya_vol_info *vol = &vol_info[idx]; in maya_vol_put() local 199 if (val > vol->maxval) in maya_vol_put() 200 val = vol->maxval; in maya_vol_put() 204 data = vol->mute; in maya_vol_put() 206 data = (val - 1) + vol->offset; in maya_vol_put() 207 data |= vol->update; in maya_vol_put() 208 changed |= wm8776_write_bits(chip->ice, wm, vol->regs[ch], in maya_vol_put() 209 vol->mask | vol->update, data); in maya_vol_put() [all …]
|
D | aureon.c | 53 unsigned short vol[8]; member 359 unsigned short vol; in aureon_ac97_vol_get() local 363 vol = aureon_ac97_read(ice, kcontrol->private_value & 0x7F); in aureon_ac97_vol_get() 364 ucontrol->value.integer.value[0] = 0x1F - (vol & 0x1F); in aureon_ac97_vol_get() 366 ucontrol->value.integer.value[1] = 0x1F - ((vol >> 8) & 0x1F); in aureon_ac97_vol_get() 682 static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned sh… in wm_set_vol() argument 686 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) { in wm_set_vol() 689 nvol = ((vol % WM_VOL_CNT) * (master % WM_VOL_CNT)) / in wm_set_vol() 761 unsigned int vol = ucontrol->value.integer.value[ch]; in wm_master_vol_put() local 762 if (vol > WM_VOL_MAX) in wm_master_vol_put() [all …]
|
/linux-6.12.1/drivers/media/radio/ |
D | radio-typhoon.c | 111 static int typhoon_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in typhoon_s_mute_volume() argument 116 vol = 0; in typhoon_s_mute_volume() 117 vol >>= 14; /* Map 16 bit to 2 bit */ in typhoon_s_mute_volume() 118 vol &= 3; in typhoon_s_mute_volume() 119 outb_p(vol / 2, isa->io); /* Set the volume, high bit. */ in typhoon_s_mute_volume() 120 outb_p(vol % 2, isa->io + 2); /* Set the volume, low bit. */ in typhoon_s_mute_volume() 122 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume() 126 if (vol && ty->muted) { in typhoon_s_mute_volume()
|
D | radio-aimslab.c | 118 static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in rtrack_s_mute_volume() argument 127 if (vol == 0) { /* volume = 0 means mute the card */ in rtrack_s_mute_volume() 130 } else if (curvol < vol) { in rtrack_s_mute_volume() 132 for (; curvol < vol; curvol++) in rtrack_s_mute_volume() 134 } else if (curvol > vol) { in rtrack_s_mute_volume() 136 for (; curvol > vol; curvol--) in rtrack_s_mute_volume() 140 rt->curvol = vol; in rtrack_s_mute_volume()
|
D | radio-terratec.c | 62 static int terratec_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in terratec_s_mute_volume() argument 67 vol = 0; in terratec_s_mute_volume() 68 vol = vol + (vol * 32); /* change both channels */ in terratec_s_mute_volume() 70 if (vol & (0x80 >> i)) in terratec_s_mute_volume()
|
D | radio-aztech.c | 109 static int aztech_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in aztech_s_mute_volume() argument 114 vol = 0; in aztech_s_mute_volume() 115 az->curvol = (vol & 1) + ((vol & 2) << 1); in aztech_s_mute_volume()
|
/linux-6.12.1/sound/soc/codecs/ |
D | tas5805m.c | 166 int vol[2]; member 174 static void set_dsp_scale(struct regmap *rm, int offset, int vol) in set_dsp_scale() argument 177 uint32_t x = tas5805m_volume[vol]; in set_dsp_scale() 193 tas5805m->is_muted, tas5805m->vol[0], tas5805m->vol[1]); in tas5805m_refresh() 203 set_dsp_scale(rm, 0x24, tas5805m->vol[0]); in tas5805m_refresh() 204 set_dsp_scale(rm, 0x28, tas5805m->vol[1]); in tas5805m_refresh() 235 ucontrol->value.integer.value[0] = tas5805m->vol[0]; in tas5805m_vol_get() 236 ucontrol->value.integer.value[1] = tas5805m->vol[1]; in tas5805m_vol_get() 261 if (tas5805m->vol[0] != ucontrol->value.integer.value[0] || in tas5805m_vol_put() 262 tas5805m->vol[1] != ucontrol->value.integer.value[1]) { in tas5805m_vol_put() [all …]
|
/linux-6.12.1/sound/synth/emux/ |
D | emux_synth.c | 742 int vol; in calc_volume() local 753 vol = (vp->velocity * main_vol * expression_vol) / (127*127); in calc_volume() 754 vol = vol * vp->reg.amplitude / 127; in calc_volume() 756 LIMITVALUE(vol, 0, 127); in calc_volume() 759 vol = snd_sf_vol_table[vol]; in calc_volume() 765 vol = voltab1[main_vol] + voltab2[vp->velocity]; in calc_volume() 766 vol = (vol * 8) / 3; in calc_volume() 767 vol += vp->reg.attenuation; in calc_volume() 768 vol += ((0x100 - vol) * expressiontab[expression_vol])/128; in calc_volume() 773 vol += snd_sf_vol_table[master_vol]; in calc_volume() [all …]
|
/linux-6.12.1/drivers/staging/vc04_services/bcm2835-audio/ |
D | bcm2835.h | 26 #define alsa2chip(vol) ((uint)(-(((vol) << 8) / 100))) argument 29 #define chip2alsa(vol) -(((vol) * 100) >> 8) argument
|
/linux-6.12.1/sound/isa/gus/ |
D | gus_volume.c | 15 unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol) in snd_gf1_lvol_to_gvol_raw() argument 19 if (vol > 65535) in snd_gf1_lvol_to_gvol_raw() 20 vol = 65535; in snd_gf1_lvol_to_gvol_raw() 21 tmp = vol; in snd_gf1_lvol_to_gvol_raw() 32 m = vol - (1 << e); in snd_gf1_lvol_to_gvol_raw()
|