Hi @noweare,
Re: So I don't know why the divided by 8 to get the number of sample.
I have absolutely no experience of I2S, but via Wikipedia, I noted the Analog Devices note at
https://www.analog.com/media/en/technical-documentation/technical-articles/MS-2275.pdf
which includes the following sentence of wisdom:
The data word length is often 16, 24, or 32 bits. For word lengths less than 32 bits, the frame length is often still 64 bits and the unused bits are just driven low by the transmitting IC.
which is obviously conducive to the notion of dividing by 8.
I haven't studied the document in full, but perhaps a careful read would reveal more.
-----------------
As a speculation on my part, I note that the original Philips document (also referenced by Wikipedia) at
https://web.archive.org/web/20070102004400/http://www.nxp.com/acrobat_download/various/I2SBUS.pdf
discusses a 'network' topology of 1 master clock, etc., with an implicit flexibility of 'coping' with systems with sources and destinations having different word lengths, and so on. As audio data has an implicit 'real-time' relationship of data content being produced and consumed, the paper notes that to provide allowance for differences in word lengths, etc., some chip manufacturers had chosen to use a fixed 'blob-size' of (64) data bits, so that the data bit rate remained the same value, even though the 'useful' bit rate may vary between implementations.
Perhaps this convention has persisted into more recent implementations? You may like to consider that the original Philips paper was written nearly 40 years ago, when changes of factors like word length, which may be determined as a simple programme parameter using contemporary hardware, may have required a complete chip redesign.
Best wishes and good luck, Dave