18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#undef TRACE_SYSTEM 38c2ecf20Sopenharmony_ci#define TRACE_SYSTEM hda_controller 48c2ecf20Sopenharmony_ci#define TRACE_INCLUDE_FILE hda_controller_trace 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#if !defined(_TRACE_HDA_CONTROLLER_H) || defined(TRACE_HEADER_MULTI_READ) 78c2ecf20Sopenharmony_ci#define _TRACE_HDA_CONTROLLER_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/tracepoint.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct azx; 128c2ecf20Sopenharmony_cistruct azx_dev; 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciTRACE_EVENT(azx_pcm_trigger, 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *dev, int cmd), 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci TP_ARGS(chip, dev, cmd), 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci TP_STRUCT__entry( 218c2ecf20Sopenharmony_ci __field( int, card ) 228c2ecf20Sopenharmony_ci __field( int, idx ) 238c2ecf20Sopenharmony_ci __field( int, cmd ) 248c2ecf20Sopenharmony_ci ), 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci TP_fast_assign( 278c2ecf20Sopenharmony_ci __entry->card = (chip)->card->number; 288c2ecf20Sopenharmony_ci __entry->idx = (dev)->core.index; 298c2ecf20Sopenharmony_ci __entry->cmd = cmd; 308c2ecf20Sopenharmony_ci ), 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci TP_printk("[%d:%d] cmd=%d", __entry->card, __entry->idx, __entry->cmd) 338c2ecf20Sopenharmony_ci); 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciTRACE_EVENT(azx_get_position, 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *dev, unsigned int pos, unsigned int delay), 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci TP_ARGS(chip, dev, pos, delay), 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci TP_STRUCT__entry( 428c2ecf20Sopenharmony_ci __field( int, card ) 438c2ecf20Sopenharmony_ci __field( int, idx ) 448c2ecf20Sopenharmony_ci __field( unsigned int, pos ) 458c2ecf20Sopenharmony_ci __field( unsigned int, delay ) 468c2ecf20Sopenharmony_ci ), 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci TP_fast_assign( 498c2ecf20Sopenharmony_ci __entry->card = (chip)->card->number; 508c2ecf20Sopenharmony_ci __entry->idx = (dev)->core.index; 518c2ecf20Sopenharmony_ci __entry->pos = pos; 528c2ecf20Sopenharmony_ci __entry->delay = delay; 538c2ecf20Sopenharmony_ci ), 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci TP_printk("[%d:%d] pos=%u, delay=%u", __entry->card, __entry->idx, __entry->pos, __entry->delay) 568c2ecf20Sopenharmony_ci); 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciDECLARE_EVENT_CLASS(azx_pcm, 598c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *azx_dev), 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci TP_ARGS(chip, azx_dev), 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci TP_STRUCT__entry( 648c2ecf20Sopenharmony_ci __field( unsigned char, stream_tag ) 658c2ecf20Sopenharmony_ci ), 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci TP_fast_assign( 688c2ecf20Sopenharmony_ci __entry->stream_tag = (azx_dev)->core.stream_tag; 698c2ecf20Sopenharmony_ci ), 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci TP_printk("stream_tag: %d", __entry->stream_tag) 728c2ecf20Sopenharmony_ci); 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ciDEFINE_EVENT(azx_pcm, azx_pcm_open, 758c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *azx_dev), 768c2ecf20Sopenharmony_ci TP_ARGS(chip, azx_dev) 778c2ecf20Sopenharmony_ci); 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ciDEFINE_EVENT(azx_pcm, azx_pcm_close, 808c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *azx_dev), 818c2ecf20Sopenharmony_ci TP_ARGS(chip, azx_dev) 828c2ecf20Sopenharmony_ci); 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ciDEFINE_EVENT(azx_pcm, azx_pcm_hw_params, 858c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *azx_dev), 868c2ecf20Sopenharmony_ci TP_ARGS(chip, azx_dev) 878c2ecf20Sopenharmony_ci); 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ciDEFINE_EVENT(azx_pcm, azx_pcm_prepare, 908c2ecf20Sopenharmony_ci TP_PROTO(struct azx *chip, struct azx_dev *azx_dev), 918c2ecf20Sopenharmony_ci TP_ARGS(chip, azx_dev) 928c2ecf20Sopenharmony_ci); 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci#endif /* _TRACE_HDA_CONTROLLER_H */ 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci/* This part must be outside protection */ 978c2ecf20Sopenharmony_ci#undef TRACE_INCLUDE_PATH 988c2ecf20Sopenharmony_ci#define TRACE_INCLUDE_PATH . 998c2ecf20Sopenharmony_ci#include <trace/define_trace.h> 100