summaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2021-06-01meta-agl-core: Rework packagegroup-agl-core-bootScott Murray3-29/+9
2021-05-31Remove old cyclone5 templateJan-Simon Moeller3-13/+0
2021-05-26Remove connman-plugin-session-policy-localNaoto Yamaguchi2-4/+1
2021-05-25Post release update to distro configJan-Simon Möller1-2/+2
2021-05-14Prepare Lucky Lamprey Milestone 1Jan-Simon Moeller1-3/+3
2021-05-13agl-shell-activator_git: Add recipelamprey_11.91.0lamprey/11.91.011.91.0Marius Vlad1-0/+22
2021-05-12wireplumber: update to 0.4 rc1George Kiagiadakis4-8/+119
2021-05-12meta-pipewire: add meta-oe dependencyScott Murray1-0/+1
2021-05-10pipewire: backport pipewiresink patches to fix stuttering and other issuesGeorge Kiagiadakis3-0/+90
2021-05-10pipewire: update to 0.3.27George Kiagiadakis3-1/+1
2021-05-05meta-agl-core: remove IMAGE_FSTYPES overrideScott Murray3-21/+3
2021-04-30meta-agl-core/recipes-graphics/wayland: Do not export seat related functionsMarius Vlad1-1/+3
2021-04-30virtio: Backport virtio sound driver.Vasyl Vavrychuk12-0/+4156
2021-04-30virtio: Bump virtio-aarch64 kernel to version v5.10.Vasyl Vavrychuk2-0/+69
2021-04-30virtualization/linux-yocto: Fix multitouch with virtio-input.Vasyl Vavrychuk2-0/+67
2021-04-30virtualization/linux-yocto: Add virtio-aarch64-standard.scc to SRC_URI.Vasyl Vavrychuk2-1/+2
2021-04-30virtualization/linux-yocto: Reorganize layout of linux-yocto kernel virtio me...Vasyl Vavrychuk6-3/+3
2021-04-26meta-pipewire: update to pipewire 0.3.25 and wireplumber masterGeorge Kiagiadakis69-2387/+1242
2021-04-26recipes-graphics/wayland/weston_8.0_aglcore: Remove unneeded patchMarius Vlad2-31/+0
2021-04-26recipes-graphics/wayland/agl-compositor: SRCREV bumpMarius Vlad1-1/+1
2021-03-31aglsetup: Override templateconf.cfg in case of -f, --force.Vasyl Vavrychuk1-0/+1
2021-03-22[RCAR] Fix sound on ulcb boardRonan Le Martret2-4/+1
2021-03-18Mask patch causing crash in luaJan-Simon Moeller1-0/+4
2021-03-15meta-agl-bsp: add pseudo abort workaround for rcar3 buildsScott Murray1-1/+31
2021-03-15meta-agl-core: remove rng-tools bbappendScott Murray4-110/+0
2021-03-15[RCAR] u-boot: move redundant-yyloc-global patch to u-boot-common.incRonan Le Martret2-0/+30
2021-03-15[RCAR] Update BSP Renesas RCAR gen3 to version 4.7.0Ronan Le Martret2-11/+6
2021-03-15Revert "meta-renesas: workaround recipe incompatibilities with YP 3.1.4"Ronan Le Martret5-189/+0
2021-03-15Revert "meta-renesas: update gstreamer version workaround"Ronan Le Martret3-6/+6
2021-03-09meta-agl-bsp: clean up Raspberry Pi Xen supportScott Murray7-54/+19
2021-03-01meta-agl-core: update poky-agl distro configurationScott Murray1-27/+12
2021-03-01meta-agl-core: update packagegroup-agl-core-bootScott Murray1-5/+2
2021-03-01meta-agl-core: fix connman-ncurses compilationScott Murray2-1/+55
2021-03-01meta-agl-core: remove libsoup bbappendScott Murray2-2/+0
2021-03-01meta-agl-core: update packagegroup-agl-core-connectivityScott Murray1-1/+0
2021-03-01meta-agl-core: fix S definition in waltham-transmitter-pluginScott Murray1-1/+1
2021-02-16meta-agl-bsp: Fix agl-refhw-h3 BBMASK definitionScott Murray1-1/+1
2021-02-16meta-renesas: update gstreamer version workaroundScott Murray3-6/+6
2021-02-05agl-compositor: Bump SRCREVMarius Vlad1-1/+1
2021-02-05meta-agl-bsp: Add reference hardware GPS supportScott Murray5-0/+113
2021-02-05meta-agl-core: Update weston-ini-conf landscape supportScott Murray3-2/+30
2021-02-05RBAModel: Added unknown_app content_idAnusha Gugale1-0/+20
2021-02-04meta-agl-core: fix entropy gathering on rng-tools 6.9Julien Massot4-0/+110
2021-02-04Post Milestone 3 change - open master for Lucky LampreyJan-Simon Möller1-4/+4
2021-02-02glmark2: Fix missing wayland-protocols dependency.Vasyl Vavrychuk1-1/+1
2021-02-02glmark2: Fix bbappend file name.Vasyl Vavrychuk1-0/+0
2021-01-29Prepare Kooky Koi Milestone 3koi_10.93.0koi/10.93.010.93.0Jan-Simon Möller1-3/+3
2021-01-26Allow -nogfx boards to start the homescreenJan-Simon Moeller3-0/+12
2021-01-26qemu[arm,arm64]: enable runqemu in graphic modeJan-Simon Moeller2-16/+19
2021-01-26change SRCREV of librbaAnusha Gugale1-1/+1
(idxFree < 0 && idx == MAX_SND_CARD) { afb_req_fail_f (request, "ucm-toomany", "SndCard devid=[%s] too many open UCM Max=%d", queryValues->devid, MAX_SND_CARD); goto OnErrorExit; } idx = idxFree; cardName = snd_ctl_card_info_get_name(cardinfo); err = snd_use_case_mgr_open(&ucmHandle, cardName); if (err) { afb_req_fail_f (request, "ucm-open", "SndCard devid=[%s] name=[%s] No UCM Profile err=%s", queryValues->devid, cardName, snd_strerror(err)); goto OnErrorExit; } ucmHandles[idx].ucm = ucmHandle; ucmHandles[idx].cardId = cardId; ucmHandles[idx].cardName = strdup(cardName); OnSuccessExit: if (ctlDev) snd_ctl_close(ctlDev); return idx; OnErrorExit: if (ctlDev) snd_ctl_close(ctlDev); return -1; } PUBLIC void alsaUseCaseQuery(struct afb_req request) { int verbCount, ucmIdx; const char **verbList; snd_use_case_mgr_t *ucmHandle; queryValuesT queryValues; json_object *ucmJs; const char *cardName; json_object *queryJ = alsaCheckQuery (request, &queryValues); if (!queryJ) goto OnErrorExit; ucmIdx = alsaUseCaseOpen (request, &queryValues, TRUE); if (ucmIdx < 0) goto OnErrorExit; ucmHandle = ucmHandles [ucmIdx].ucm; cardName = ucmHandles [ucmIdx].cardName; verbCount = snd_use_case_get_list (ucmHandle, "_verbs", &verbList); if (verbCount < 0) { afb_req_fail_f (request, "ucm-list", "SndCard devid=[%s] name=[%s] No UCM Verbs", queryValues.devid, cardName); goto OnErrorExit; } ucmJs = json_object_new_array(); for (int idx=0; idx < verbCount; idx +=2) { int devCount, modCount, tqCount; const char **devList, **modList, **tqList; json_object *ucmJ = json_object_new_object(); char identifier[32]; json_object_object_add (ucmJ, "verb", json_object_new_string(verbList[idx])); if (verbList[idx+1]) json_object_object_add (ucmJ, "info", json_object_new_string(verbList[idx+1])); AFB_DEBUG ("Verb[%d] Action=%s Info=%s", idx, verbList[idx], verbList[idx+1]); snprintf (identifier, sizeof(identifier), "_devices/%s", verbList[idx]); devCount = snd_use_case_get_list (ucmHandle, identifier, &devList); if (devCount > 0) { json_object *devsJ = json_object_new_array(); for (int jdx=0; jdx < devCount; jdx+=2) { json_object *devJ = json_object_new_object(); AFB_DEBUG ("device[%d] Action=%s Info=%s", jdx, devList[jdx], devList[jdx+1]); json_object_object_add (devJ, "dev", json_object_new_string(devList[jdx])); if (devList[jdx+1]) json_object_object_add (devJ, "info", json_object_new_string(devList[jdx+1])); json_object_array_add (devsJ, devJ); } json_object_object_add(ucmJ,"devices", devsJ); snd_use_case_free_list(devList, devCount); } snprintf (identifier, sizeof(identifier), "_modifiers/%s", verbList[idx]); modCount = snd_use_case_get_list (ucmHandle, identifier, &modList); if (modCount > 0) { json_object *modsJ = json_object_new_array(); for (int jdx=0; jdx < modCount; jdx+=2) { json_object *modJ = json_object_new_object(); AFB_DEBUG ("modifier[%d] Action=%s Info=%s", jdx, modList[jdx], modList[jdx+1]); json_object_object_add (modJ, "mod", json_object_new_string(modList[jdx])); if (modList[jdx+1]) json_object_object_add (modJ, "info", json_object_new_string(modList[jdx+1])); json_object_array_add (modsJ, modJ); } json_object_object_add(ucmJ,"modifiers", modsJ); snd_use_case_free_list(modList, modCount); } snprintf (identifier, sizeof(identifier), "TQ/%s", verbList[idx]); tqCount = snd_use_case_get_list (ucmHandle, identifier, &tqList); if (tqCount > 0) { json_object *tqsJ = json_object_new_array(); for (int jdx=0; jdx < tqCount; jdx+=2) { json_object *tqJ = json_object_new_object(); AFB_DEBUG ("toneqa[%d] Action=%s Info=%s", jdx, tqList[jdx], tqList[jdx+1]); json_object_object_add (tqJ, "tq", json_object_new_string(tqList[jdx])); if (tqList[jdx+1]) json_object_object_add (tqJ, "info", json_object_new_string(tqList[jdx+1])); json_object_array_add (tqsJ, tqJ); } json_object_object_add(ucmJ,"tqs", tqsJ); snd_use_case_free_list(tqList, tqCount); } json_object_array_add (ucmJs, ucmJ); } afb_req_success (request, ucmJs, NULL); snd_use_case_free_list(verbList, verbCount); OnErrorExit: return; } STATIC json_object *ucmGetValue (ucmHandleT *ucmHandle, const char *verb, const char *mod, const char *label) { char identifier[80]; char *value; int err; json_object *jValue; // handle optional parameters if (!mod) mod=""; if (!verb) verb=""; if (!label) { AFB_NOTICE ("ucmGetValue cardname=[%s] value label missing", ucmHandle->cardName); goto OnErrorExit; } snprintf (identifier, sizeof(identifier), "%s/%s/%s", label, mod, verb); err = snd_use_case_get (ucmHandle->ucm, identifier, (const char**)&value); // Note: value casting is a known "FEATURE" of AlsaUCM API if (err) { AFB_DEBUG ("ucmGetValue cardname=[%s] identifier=[%s] error=%s", ucmHandle->cardName, identifier, snd_strerror (err)); goto OnErrorExit; } // copy value into json object and free string jValue = json_object_new_string (value); free (value); return (jValue); OnErrorExit: return (NULL); } PUBLIC void alsaUseCaseGet (struct afb_req request) { int ucmIdx, labelCount; queryValuesT queryValues; json_object *jResponse = json_object_new_object(); json_object *jWarnings = json_object_new_array(); const char *warnings=NULL; json_object *queryJ = alsaCheckQuery (request, &queryValues); if (!queryJ) goto OnErrorExit; ; ucmIdx = alsaUseCaseOpen (request, &queryValues, TRUE); if (ucmIdx < 0) goto OnErrorExit; const char *cardName= ucmHandles[ucmIdx].cardName; const char *verb = afb_req_value(request, "verb"); const char *mod = afb_req_value(request, "mod"); const char *dev = afb_req_value(request, "dev"); if (dev && mod) { afb_req_fail_f (request, "ucmget-labels", "SndCard devid=[%s] name=[%s] UCM mod+dev incompatible", queryValues.devid, cardName); goto OnErrorExit; } // device selection is handle as a modifier if (dev) mod=dev; const char *labels = afb_req_value(request, "value"); if (!labels) { afb_req_fail_f (request, "ucmget-labels", "SndCard devid=[%s] name=[%s] UCM values name missing", queryValues.devid, cardName); goto OnErrorExit; } json_object *jLabels = json_tokener_parse(labels); if (!jLabels) { afb_req_fail_f (request, "ucmget-notjson","labels=%s not a valid json entry", labels); goto OnErrorExit; }; enum json_type jtype= json_object_get_type(jLabels); switch (jtype) { json_object *tmpJ; case json_type_array: labelCount = json_object_array_length (jLabels); break; case json_type_string: tmpJ = json_object_new_array (); labelCount = 1; json_object_array_add (tmpJ, jLabels); jLabels=tmpJ; break; default: afb_req_fail_f (request, "ucmget-notarray","labels=%s not valid JSON array", labels); goto OnErrorExit; } for (int idx=0; idx < labelCount; idx++) { json_object *jValue, *jLabel; const char *label ; jLabel= json_object_array_get_idx (jLabels, idx); label= json_object_get_string (jLabel); jValue = ucmGetValue (&ucmHandles[ucmIdx], verb, mod, label); if (jValue) json_object_object_add (jResponse, label, jValue); else { json_object_array_add (jWarnings, jLabel); } } // use info section to notified not found values label if (json_object_array_length (jWarnings) > 0) { json_object *tmpJ = json_object_new_object (); json_object_object_add (tmpJ, "no-context", jWarnings); warnings= json_object_get_string (tmpJ); } afb_req_success (request, jResponse, warnings); OnErrorExit: return; } PUBLIC void alsaUseCaseSet(struct afb_req request) { int err, ucmIdx; queryValuesT queryValues; json_object *jResponse = json_object_new_object(); json_object *queryJ = alsaCheckQuery (request, &queryValues); if (!queryJ) goto OnErrorExit; ucmIdx = alsaUseCaseOpen (request, &queryValues, TRUE); if (ucmIdx < 0) goto OnErrorExit; snd_use_case_mgr_t *ucmMgr= ucmHandles[ucmIdx].ucm; const char *cardName= ucmHandles[ucmIdx].cardName; const char *verb = afb_req_value(request, "verb"); const char *mod = afb_req_value(request, "mod"); const char *dev = afb_req_value(request, "dev"); // Known identifiers: _verb - set current verb = value _enadev - enable given device = value _disdev - disable given device = value _swdev/{old_device} - new_device = value if (verb) { err = snd_use_case_set (ucmMgr, "_verb", verb); if (err) { afb_req_fail_f (request, "ucmset-verb", "SndCard devid=[%s] name=[%s] Invalid UCM verb=[%s] err=%s", queryValues.devid, cardName, verb, snd_strerror(err)); goto OnErrorExit; } } if (dev) { err = snd_use_case_set (ucmMgr, "_enadev", dev); if (err) { afb_req_fail_f (request, "ucmset-dev", "SndCard devid=[%s] name=[%s] Invalid UCMverb=[%s] dev=%s err=%s", queryValues.devid, cardName, verb, dev, snd_strerror(err)); goto OnErrorExit; } } if (mod) { err = snd_use_case_set (ucmMgr, "_enamod", mod); if (err) { afb_req_fail_f (request, "ucmset-mod", "SndCard devid=[%s] name=[%s] Invalid UCM verb=[%s] mod=[%s] err=%s", queryValues.devid, cardName, verb, mod, snd_strerror(err)); goto OnErrorExit; } } // label are requested transfert request to get if (afb_req_value(request, "value")) return alsaUseCaseGet(request); if (queryValues.mode <= 3) { json_object *jValue; jValue = ucmGetValue (&ucmHandles[ucmIdx], verb, dev, "OutputDspName"); if (jValue) json_object_object_add (jResponse, "OutputDspName", jValue); jValue = ucmGetValue (&ucmHandles[ucmIdx], verb, dev, "PlaybackPCM"); if (jValue) json_object_object_add (jResponse, "PlaybackPCM", jValue); jValue = ucmGetValue (&ucmHandles[ucmIdx], verb, mod, "CapturePCM"); if (jValue) json_object_object_add (jResponse, "CapturePCM", jValue); } afb_req_success (request, jResponse, NULL); OnErrorExit: return; } PUBLIC void alsaUseCaseReset (struct afb_req request) { int err, ucmIdx; queryValuesT queryValues; json_object *queryJ = alsaCheckQuery (request, &queryValues); if (!queryJ) goto OnErrorExit; ucmIdx = alsaUseCaseOpen (request, &queryValues, FALSE); if (ucmIdx < 0) goto OnErrorExit; err= snd_use_case_mgr_reset (ucmHandles[ucmIdx].ucm); if (err) { afb_req_fail_f (request, "ucmreset-fail","devid=%s Card Name=%s", queryValues.devid, ucmHandles[ucmIdx].cardName); goto OnErrorExit; } afb_req_success (request, NULL, NULL); OnErrorExit: return; } PUBLIC void alsaUseCaseClose (struct afb_req request) { int err, ucmIdx; queryValuesT queryValues; json_object *queryJ = alsaCheckQuery (request, &queryValues); if (!queryJ) goto OnErrorExit; ucmIdx = alsaUseCaseOpen (request, &queryValues, FALSE); if (ucmIdx < 0) goto OnErrorExit; err= snd_use_case_mgr_close (ucmHandles[ucmIdx].ucm); if (err) { afb_req_fail_f (request, "ucmreset-close","devid=%s Card Name=%s", queryValues.devid, ucmHandles[ucmIdx].cardName); goto OnErrorExit; } // do not forget to release sound card name string free (ucmHandles[ucmIdx].cardName); afb_req_success (request, NULL, NULL); OnErrorExit: return; }