{"action":"created","comment":{"url":"https://api.github.com/repos/thesofproject/linux/pulls/comments/231408228","pull_request_review_id":172371130,"id":231408228,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTQwODIyOA==","diff_hunk":"@@ -154,16 +163,24 @@ int snd_sof_init_trace_ipc(struct snd_sof_dev *sdev)\n \tif (sdev->dtrace_is_enabled)\n \t\treturn -EINVAL;\n \n+\t/* update init_offset, and reinitial offset to 0 */\n+\tsdev->trace_init_offset = (sdev->trace_init_offset +\n+\t\t\t\t  sdev->trace_offset) %\n+\t\t\t\t sdev->dmatb.bytes;","path":"sound/soc/sof/trace.c","position":52,"original_position":52,"commit_id":"17e7587305736edd50ed8e28c129b63fa25f6236","original_commit_id":"17e7587305736edd50ed8e28c129b63fa25f6236","user":{"login":"ranj063","id":7766921,"node_id":"MDQ6VXNlcjc3NjY5MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/7766921?v=4","gravatar_id":"","url":"https://api.github.com/users/ranj063","html_url":"https://github.com/ranj063","followers_url":"https://api.github.com/users/ranj063/followers","following_url":"https://api.github.com/users/ranj063/following{/other_user}","gists_url":"https://api.github.com/users/ranj063/gists{/gist_id}","starred_url":"https://api.github.com/users/ranj063/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranj063/subscriptions","organizations_url":"https://api.github.com/users/ranj063/orgs","repos_url":"https://api.github.com/users/ranj063/repos","events_url":"https://api.github.com/users/ranj063/events{/privacy}","received_events_url":"https://api.github.com/users/ranj063/received_events","type":"User","site_admin":false},"body":"@keyonjie yes, this makes sense. Sorry about the confusion","created_at":"2018-11-07T07:58:40Z","updated_at":"2018-11-07T07:58:40Z","html_url":"https://github.com/thesofproject/linux/pull/248#discussion_r231408228","pull_request_url":"https://api.github.com/repos/thesofproject/linux/pulls/248","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/comments/231408228"},"html":{"href":"https://github.com/thesofproject/linux/pull/248#discussion_r231408228"},"pull_request":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/248"}},"in_reply_to_id":231224908},"pull_request":{"url":"https://api.github.com/repos/thesofproject/linux/pulls/248","id":228598913,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NTk4OTEz","html_url":"https://github.com/thesofproject/linux/pull/248","diff_url":"https://github.com/thesofproject/linux/pull/248.diff","patch_url":"https://github.com/thesofproject/linux/pull/248.patch","issue_url":"https://api.github.com/repos/thesofproject/linux/issues/248","number":248,"state":"open","locked":false,"title":"ASoC: SOF: trace: fix trace doesn't update issue","user":{"login":"keyonjie","id":10458135,"node_id":"MDQ6VXNlcjEwNDU4MTM1","avatar_url":"https://avatars1.githubusercontent.com/u/10458135?v=4","gravatar_id":"","url":"https://api.github.com/users/keyonjie","html_url":"https://github.com/keyonjie","followers_url":"https://api.github.com/users/keyonjie/followers","following_url":"https://api.github.com/users/keyonjie/following{/other_user}","gists_url":"https://api.github.com/users/keyonjie/gists{/gist_id}","starred_url":"https://api.github.com/users/keyonjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyonjie/subscriptions","organizations_url":"https://api.github.com/users/keyonjie/orgs","repos_url":"https://api.github.com/users/keyonjie/repos","events_url":"https://api.github.com/users/keyonjie/events{/privacy}","received_events_url":"https://api.github.com/users/keyonjie/received_events","type":"User","site_admin":false},"body":"We have issues for DMA trace if runtime suspend is turned on:\r\na. Those logs before suspend will be cleared/overwritten after resume.\r\nb. If we run logger at suspend, logs won't be updated though the ADSP is\r\nrunning after that.\r\n\r\nTo fix these issues, this commit change the DMA trace behavior as below:\r\n\r\n1. move init_waitqueue_head() to snd_sof_init_trace(), only\r\ninit_waitqueue() at first boot.\r\n2. add a member host_init_offset to store the last trace offset before\r\nsuspend, and calculate the available log size based on it.\r\n3. add a function hda_dsp_trace_setup_bdl() to setup bdl entries for DMA\r\ntrace, when host_init_offset!=0, we divide buffer into 2 BDL entries:\r\n[host_init_offset, buffer_size) and [0, host_init_offset). This make FW\r\npossible to copy new logs to destination from host_init_offset, which\r\nwon't overwrite the existed logs before suspend.\r\n\r\nWith these changes, both issues mentioned above are resolved on APL.\r\n\r\nTodo: for SKL- platforms where not using BDL entries, FW to support\r\nnon-0 offset need to be implemented for those platforms, please refer\r\nto this:\r\nhttps://github.com/thesofproject/sof/issues/544\r\n\r\nSigned-off-by: Keyon Jie <yang.jie@linux.intel.com>","created_at":"2018-11-06T07:41:12Z","updated_at":"2018-11-07T07:58:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49dcc28d0398af188acca917be680a0f74943d82","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thesofproject/linux/pulls/248/commits","review_comments_url":"https://api.github.com/repos/thesofproject/linux/pulls/248/comments","review_comment_url":"https://api.github.com/repos/thesofproject/linux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thesofproject/linux/issues/248/comments","statuses_url":"https://api.github.com/repos/thesofproject/linux/statuses/17e7587305736edd50ed8e28c129b63fa25f6236","head":{"label":"keyonjie:trace_fix","ref":"trace_fix","sha":"17e7587305736edd50ed8e28c129b63fa25f6236","user":{"login":"keyonjie","id":10458135,"node_id":"MDQ6VXNlcjEwNDU4MTM1","avatar_url":"https://avatars1.githubusercontent.com/u/10458135?v=4","gravatar_id":"","url":"https://api.github.com/users/keyonjie","html_url":"https://github.com/keyonjie","followers_url":"https://api.github.com/users/keyonjie/followers","following_url":"https://api.github.com/users/keyonjie/following{/other_user}","gists_url":"https://api.github.com/users/keyonjie/gists{/gist_id}","starred_url":"https://api.github.com/users/keyonjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyonjie/subscriptions","organizations_url":"https://api.github.com/users/keyonjie/orgs","repos_url":"https://api.github.com/users/keyonjie/repos","events_url":"https://api.github.com/users/keyonjie/events{/privacy}","received_events_url":"https://api.github.com/users/keyonjie/received_events","type":"User","site_admin":false},"repo":{"id":28997864,"node_id":"MDEwOlJlcG9zaXRvcnkyODk5Nzg2NA==","name":"linux","full_name":"keyonjie/linux","private":false,"owner":{"login":"keyonjie","id":10458135,"node_id":"MDQ6VXNlcjEwNDU4MTM1","avatar_url":"https://avatars1.githubusercontent.com/u/10458135?v=4","gravatar_id":"","url":"https://api.github.com/users/keyonjie","html_url":"https://github.com/keyonjie","followers_url":"https://api.github.com/users/keyonjie/followers","following_url":"https://api.github.com/users/keyonjie/following{/other_user}","gists_url":"https://api.github.com/users/keyonjie/gists{/gist_id}","starred_url":"https://api.github.com/users/keyonjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyonjie/subscriptions","organizations_url":"https://api.github.com/users/keyonjie/orgs","repos_url":"https://api.github.com/users/keyonjie/repos","events_url":"https://api.github.com/users/keyonjie/events{/privacy}","received_events_url":"https://api.github.com/users/keyonjie/received_events","type":"User","site_admin":false},"html_url":"https://github.com/keyonjie/linux","description":"Linux kernel source tree","fork":true,"url":"https://api.github.com/repos/keyonjie/linux","forks_url":"https://api.github.com/repos/keyonjie/linux/forks","keys_url":"https://api.github.com/repos/keyonjie/linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keyonjie/linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keyonjie/linux/teams","hooks_url":"https://api.github.com/repos/keyonjie/linux/hooks","issue_events_url":"https://api.github.com/repos/keyonjie/linux/issues/events{/number}","events_url":"https://api.github.com/repos/keyonjie/linux/events","assignees_url":"https://api.github.com/repos/keyonjie/linux/assignees{/user}","branches_url":"https://api.github.com/repos/keyonjie/linux/branches{/branch}","tags_url":"https://api.github.com/repos/keyonjie/linux/tags","blobs_url":"https://api.github.com/repos/keyonjie/linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keyonjie/linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keyonjie/linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/keyonjie/linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keyonjie/linux/statuses/{sha}","languages_url":"https://api.github.com/repos/keyonjie/linux/languages","stargazers_url":"https://api.github.com/repos/keyonjie/linux/stargazers","contributors_url":"https://api.github.com/repos/keyonjie/linux/contributors","subscribers_url":"https://api.github.com/repos/keyonjie/linux/subscribers","subscription_url":"https://api.github.com/repos/keyonjie/linux/subscription","commits_url":"https://api.github.com/repos/keyonjie/linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/keyonjie/linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/keyonjie/linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/keyonjie/linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/keyonjie/linux/contents/{+path}","compare_url":"https://api.github.com/repos/keyonjie/linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keyonjie/linux/merges","archive_url":"https://api.github.com/repos/keyonjie/linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keyonjie/linux/downloads","issues_url":"https://api.github.com/repos/keyonjie/linux/issues{/number}","pulls_url":"https://api.github.com/repos/keyonjie/linux/pulls{/number}","milestones_url":"https://api.github.com/repos/keyonjie/linux/milestones{/number}","notifications_url":"https://api.github.com/repos/keyonjie/linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keyonjie/linux/labels{/name}","releases_url":"https://api.github.com/repos/keyonjie/linux/releases{/id}","deployments_url":"https://api.github.com/repos/keyonjie/linux/deployments","created_at":"2015-01-09T03:01:34Z","updated_at":"2015-01-09T03:05:54Z","pushed_at":"2018-11-06T14:46:38Z","git_url":"git://github.com/keyonjie/linux.git","ssh_url":"git@github.com:keyonjie/linux.git","clone_url":"https://github.com/keyonjie/linux.git","svn_url":"https://github.com/keyonjie/linux","homepage":"","size":2313666,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"for-next"}},"base":{"label":"thesofproject:topic/sof-dev","ref":"topic/sof-dev","sha":"af44aa9b7208f75d57f9173e397d0fd0e7773f1b","user":{"login":"thesofproject","id":39773507,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzczNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/39773507?v=4","gravatar_id":"","url":"https://api.github.com/users/thesofproject","html_url":"https://github.com/thesofproject","followers_url":"https://api.github.com/users/thesofproject/followers","following_url":"https://api.github.com/users/thesofproject/following{/other_user}","gists_url":"https://api.github.com/users/thesofproject/gists{/gist_id}","starred_url":"https://api.github.com/users/thesofproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesofproject/subscriptions","organizations_url":"https://api.github.com/users/thesofproject/orgs","repos_url":"https://api.github.com/users/thesofproject/repos","events_url":"https://api.github.com/users/thesofproject/events{/privacy}","received_events_url":"https://api.github.com/users/thesofproject/received_events","type":"Organization","site_admin":false},"repo":{"id":135611127,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU2MTExMjc=","name":"linux","full_name":"thesofproject/linux","private":false,"owner":{"login":"thesofproject","id":39773507,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NzczNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/39773507?v=4","gravatar_id":"","url":"https://api.github.com/users/thesofproject","html_url":"https://github.com/thesofproject","followers_url":"https://api.github.com/users/thesofproject/followers","following_url":"https://api.github.com/users/thesofproject/following{/other_user}","gists_url":"https://api.github.com/users/thesofproject/gists{/gist_id}","starred_url":"https://api.github.com/users/thesofproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesofproject/subscriptions","organizations_url":"https://api.github.com/users/thesofproject/orgs","repos_url":"https://api.github.com/users/thesofproject/repos","events_url":"https://api.github.com/users/thesofproject/events{/privacy}","received_events_url":"https://api.github.com/users/thesofproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/thesofproject/linux","description":"Linux kernel source tree","fork":true,"url":"https://api.github.com/repos/thesofproject/linux","forks_url":"https://api.github.com/repos/thesofproject/linux/forks","keys_url":"https://api.github.com/repos/thesofproject/linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thesofproject/linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thesofproject/linux/teams","hooks_url":"https://api.github.com/repos/thesofproject/linux/hooks","issue_events_url":"https://api.github.com/repos/thesofproject/linux/issues/events{/number}","events_url":"https://api.github.com/repos/thesofproject/linux/events","assignees_url":"https://api.github.com/repos/thesofproject/linux/assignees{/user}","branches_url":"https://api.github.com/repos/thesofproject/linux/branches{/branch}","tags_url":"https://api.github.com/repos/thesofproject/linux/tags","blobs_url":"https://api.github.com/repos/thesofproject/linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thesofproject/linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thesofproject/linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/thesofproject/linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thesofproject/linux/statuses/{sha}","languages_url":"https://api.github.com/repos/thesofproject/linux/languages","stargazers_url":"https://api.github.com/repos/thesofproject/linux/stargazers","contributors_url":"https://api.github.com/repos/thesofproject/linux/contributors","subscribers_url":"https://api.github.com/repos/thesofproject/linux/subscribers","subscription_url":"https://api.github.com/repos/thesofproject/linux/subscription","commits_url":"https://api.github.com/repos/thesofproject/linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/thesofproject/linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/thesofproject/linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/thesofproject/linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/thesofproject/linux/contents/{+path}","compare_url":"https://api.github.com/repos/thesofproject/linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thesofproject/linux/merges","archive_url":"https://api.github.com/repos/thesofproject/linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thesofproject/linux/downloads","issues_url":"https://api.github.com/repos/thesofproject/linux/issues{/number}","pulls_url":"https://api.github.com/repos/thesofproject/linux/pulls{/number}","milestones_url":"https://api.github.com/repos/thesofproject/linux/milestones{/number}","notifications_url":"https://api.github.com/repos/thesofproject/linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thesofproject/linux/labels{/name}","releases_url":"https://api.github.com/repos/thesofproject/linux/releases{/id}","deployments_url":"https://api.github.com/repos/thesofproject/linux/deployments","created_at":"2018-05-31T16:47:45Z","updated_at":"2018-11-07T03:35:08Z","pushed_at":"2018-11-07T03:32:48Z","git_url":"git://github.com/thesofproject/linux.git","ssh_url":"git@github.com:thesofproject/linux.git","clone_url":"https://github.com/thesofproject/linux.git","svn_url":"https://github.com/thesofproject/linux","homepage":"","size":2755689,"stargazers_count":7,"watchers_count":7,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":22,"open_issues":52,"watchers":7,"default_branch":"topic/sof-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/248"},"html":{"href":"https://github.com/thesofproject/linux/pull/248"},"issue":{"href":"https://api.github.com/repos/thesofproject/linux/issues/248"},"comments":{"href":"https://api.github.com/repos/thesofproject/linux/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thesofproject/linux/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/thesofproject/linux/statuses/17e7587305736edd50ed8e28c129b63fa25f6236"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ranj063"}}